From 7c5a0e6a3d187b6ec73b05f3584594f67d9ee562 Mon Sep 17 00:00:00 2001 From: Siarzhuk Zharski Date: Sat, 23 May 2009 12:46:16 +0000 Subject: [PATCH] - refactored vim Makefile. More natural way of building and installing instroduced. --- app-editors/vim/patches/vim-7.2.patch | 78 ++++++++++++++++++++------- app-editors/vim/vim-7.2.bep | 6 +-- 2 files changed, 63 insertions(+), 21 deletions(-) diff --git a/app-editors/vim/patches/vim-7.2.patch b/app-editors/vim/patches/vim-7.2.patch index 13d223d55..a23587032 100644 --- a/app-editors/vim/patches/vim-7.2.patch +++ b/app-editors/vim/patches/vim-7.2.patch @@ -1,25 +1,24 @@ diff -Naur vim72/Makefile vim72.haiku/Makefile --- vim72/Makefile 2009-04-19 20:53:31.000000000 +0000 +++ vim72.haiku/Makefile 2009-04-18 09:14:47.000000000 +0000 -@@ -185,6 +185,14 @@ +@@ -185,6 +185,13 @@ # - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy # them to here. # - "make os2bin". +# +# BeOS/Haiku OS -+# - unpack Unix sources -+# - aplly Haiku patch -+# - go to "src" directory -+# - regenerate configure by "autoconf -o auto/configure configure.in" command -+# - use typical Unix configure and build procedures -+# - to install under Haiku use "make install_beos" command. ++# - Unpack the Unix "src", "extra" and "rt" archives. ++# - Aplly Haiku patch. ++# - Go to "src" directory and use "make autoconf" to regenerate configure. ++# - Use typical Unix build and install procedures. ++# TODO: describe procedure of creating package! VIMVER = vim-$(MAJOR).$(MINOR) VERSION = $(MAJOR)$(MINOR) diff -Naur vim72/src/Makefile vim72.haiku/src/Makefile --- vim72/src/Makefile 2009-04-19 20:53:35.000000000 +0000 +++ vim72.haiku/src/Makefile 2009-04-23 22:26:29.000000000 +0000 -@@ -1208,6 +1208,19 @@ +@@ -1208,6 +1208,20 @@ # too: #EXTRA_LIBS = /usr/openwin/lib/libXmu.sa -lm @@ -31,15 +30,16 @@ diff -Naur vim72/src/Makefile vim72.haiku/src/Makefile +BEOSGUI_LIBS_DIR = +BEOSGUI_LIBS1 = -lbe -lroot -ltracker +BEOSGUI_LIBS2 = -+BEOSGUI_INSTALL = install_normal -+BEOSGUI_TARGETS = installglinks -+BEOSGUI_MAN_TARGETS = installghelplinks ++BEOSGUI_INSTALL = install_normal install_beos_extra ++BEOSGUI_TARGETS = installglinks_beos ++BEOSGUI_MAN_TARGETS = +BEOSGUI_TESTTARGET = gui ++BEOSGUI_BUNDLE = + # PHOTON GUI PHOTONGUI_SRC = gui.c gui_photon.c pty.c PHOTONGUI_OBJ = objects/gui.o objects/gui_photon.o objects/pty.o -@@ -2381,6 +2394,9 @@ +@@ -2381,6 +2395,9 @@ objects/gui_athena.o: gui_athena.c $(CCC) -o $@ gui_athena.c @@ -49,7 +49,7 @@ diff -Naur vim72/src/Makefile vim72.haiku/src/Makefile objects/gui_beval.o: gui_beval.c $(CCC) -o $@ gui_beval.c -@@ -2486,6 +2502,9 @@ +@@ -2486,6 +2503,9 @@ objects/os_beos.o: os_beos.c $(CCC) -o $@ os_beos.c @@ -59,20 +59,62 @@ diff -Naur vim72/src/Makefile vim72.haiku/src/Makefile objects/os_qnx.o: os_qnx.c $(CCC) -o $@ os_qnx.c -@@ -2645,6 +2664,17 @@ +@@ -2645,6 +2665,59 @@ ############################################################################### ++### +### BeOS/Haiku OS installation +### -+### This rule add resources to already installed vim binary -+### copy some required files and update system MIME database -+ -+install_beos: install objects/os_beos.rsrc ++### This rule: ++### - add resources to already installed vim binary to avoid stripping ++### them during install; ++### - copy rgb.txt to runtime directory; ++### - update system MIME database with info about vim application. ++### ++install_beos_extra: $(DEST_BIN)/$(VIMTARGET) objects/os_beos.rsrc + xres -o $(DEST_BIN)/$(VIMTARGET) objects/os_beos.rsrc + $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(DEST_RT) + mimeset $(DEST_BIN)/$(VIMTARGET) + ++### ++### List of g*-links that should be replaced with shell script equivalents. ++### This solves the problem of them from Tracker. ++### ++BEOS_GLINKS = $(DEST_BIN)/$(GVIMTARGET) \ ++ $(DEST_BIN)/$(GVIEWTARGET) \ ++ $(DEST_BIN)/$(GVIMDIFFTARGET) \ ++ $(DEST_BIN)/$(RGVIMTARGET) \ ++ $(DEST_BIN)/$(RGVIEWTARGET) ++### ++### This rule: ++### - Replace g*-links with shell script equivalents to solve the problem ++### of calling them from Tracker, ++### - add icon resources to mentioned g*-link shell scripts. ++### ++installglinks_beos: $(BEOS_GLINKS) install_beos_extra ++ @catattr -r "BEOS:L:STD_ICON" $(DEST_BIN)/$(VIMTARGET) > ~icon.attr ++ @catattr -r "BEOS:M:STD_ICON" $(DEST_BIN)/$(VIMTARGET) > ~micon.attr ++ @for i in $(BEOS_GLINKS); do \ ++ rm $$i ; \ ++ echo "#!/bin/sh" > $$i ; \ ++ case $$i in \ ++ $(DEST_BIN)/$(GVIMTARGET)) echo "$(VIMTARGET) -g" >> $$i;; \ ++ $(DEST_BIN)/$(GVIEWTARGET)) echo "$(VIMTARGET) -g -R" >> $$i;; \ ++ $(DEST_BIN)/$(GVIMDIFFTARGET)) echo "$(VIMTARGET) -g -d" >> $$i;; \ ++ $(DEST_BIN)/$(RGVIMTARGET)) echo "$(VIMTARGET) -Z -g" >> $$i;; \ ++ $(DEST_BIN)/$(RGVIEWTARGET)) echo "$(VIMTARGET) -Z -g -R" >> $$i;; \ ++ *) echo "$(VIMTARGET)" >> $$i;; \ ++ esac ; \ ++ chmod $(BINMOD) $$i ; \ ++ addattr -f ~icon.attr -t \'ICON\' BEOS:L:STD_ICON $$i ; \ ++ addattr -f ~micon.attr -t \'MICN\' BEOS:M:STD_ICON $$i ; \ ++ done ++ @addattr -f ~icon.attr -t \'ICON\' BEOS:L:STD_ICON $(DEST_BIN)/$(VIMNAME)tutor ++ @addattr -f ~micon.attr -t \'MICN\' BEOS:M:STD_ICON $(DEST_BIN)/$(VIMNAME)tutor ++ @rm ~icon.attr ++ @rm ~micon.attr ++ +############################################################################### ### (automatically generated by 'make depend') ### Dependencies: diff --git a/app-editors/vim/vim-7.2.bep b/app-editors/vim/vim-7.2.bep index 815818832..945f852fb 100644 --- a/app-editors/vim/vim-7.2.bep +++ b/app-editors/vim/vim-7.2.bep @@ -12,13 +12,13 @@ DEPEND="" BUILD { cd vim72 cd src - autoconf -o auto/configure configure.in + make autoconf cd ../ ./configure --prefix=/boot/common --with-features=big make } INSTALL { - cd vim72/src - make install_beos + cd vim72 + make install }