diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-01-27 21:38:54 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-01-27 21:38:54 +0000 |
commit | c1b6898520a4e70fe2a314ff34b3852cd7b52253 (patch) | |
tree | 1400b6ca886426b8af9f411cdbe0114df8e34fef /databases/msql | |
parent | 8b33f507d18b2729d9529c4855ead4633f6aa1a3 (diff) | |
download | ports-c1b6898520a4e70fe2a314ff34b3852cd7b52253.tar.gz ports-c1b6898520a4e70fe2a314ff34b3852cd7b52253.zip |
Install & use shared libs
Notes
Notes:
svn path=/head/; revision=37655
Diffstat (limited to 'databases/msql')
-rw-r--r-- | databases/msql/Makefile | 6 | ||||
-rw-r--r-- | databases/msql/files/patch-ac | 4 | ||||
-rw-r--r-- | databases/msql/files/patch-af | 69 | ||||
-rw-r--r-- | databases/msql/files/patch-ak | 13 | ||||
-rw-r--r-- | databases/msql/files/patch-as | 11 | ||||
-rw-r--r-- | databases/msql/files/patch-ax | 14 | ||||
-rw-r--r-- | databases/msql/files/slibinstall.mm | 27 | ||||
-rw-r--r-- | databases/msql/files/slibrary_unix.mm | 51 | ||||
-rw-r--r-- | databases/msql/files/sobject.mm | 20 | ||||
-rw-r--r-- | databases/msql/pkg-plist | 9 |
10 files changed, 170 insertions, 54 deletions
diff --git a/databases/msql/Makefile b/databases/msql/Makefile index 22e773b5415c..63bc7d85a2b9 100644 --- a/databases/msql/Makefile +++ b/databases/msql/Makefile @@ -7,10 +7,13 @@ PORTNAME= msql PORTVERSION= 2.0.11 +PORTREVISION= 1 CATEGORIES= databases MAINTAINER= ports@FreeBSD.org +INSTALLS_SHLIB= YES + # Not free for commercial use. Must create a user on the local system NO_PACKAGE= YES RESTRICTED= "restrictive copyright (no commercial use)" @@ -22,7 +25,8 @@ MAKE_ENV+= WRKSRC=${WRKSRC} #OVERWRITE_DB= YES post-patch: - cp ${FILESDIR}/sobject.mm ${WRKSRC}/src/makegen + cd ${FILESDIR}; \ + cp slibinstall.mm slibrary_unix.mm ${WRKSRC}/src/makegen do-configure: cd ${WRKSRC}; ${MAKE} target diff --git a/databases/msql/files/patch-ac b/databases/msql/files/patch-ac index e2e743225276..8eecb6a50c94 100644 --- a/databases/msql/files/patch-ac +++ b/databases/msql/files/patch-ac @@ -1,5 +1,5 @@ --- src/conf/site.mm.in.orig Thu Aug 19 07:33:09 1999 -+++ src/conf/site.mm.in Sat Jan 27 08:26:29 2001 ++++ src/conf/site.mm.in Sat Jan 27 23:48:19 2001 @@ -3,8 +3,8 @@ # @@ -16,5 +16,5 @@ PID_DIR= @PID_DIR@ -CFLAGS= -O -I$(TOP)/ $(EXTRA_CFLAGS) -D$(OS_TYPE) -+CFLAGS+= -I$(TOP)/ $(EXTRA_CFLAGS) -D$(OS_TYPE) ++CFLAGS+= -I$(TOP)/ $(EXTRA_CFLAGS) -D$(OS_TYPE) -fpic -DPIC LDLIBS= -L$(TOP)/lib $(EXTRA_LIB) diff --git a/databases/msql/files/patch-af b/databases/msql/files/patch-af index 6379991ea961..94faaefc436c 100644 --- a/databases/msql/files/patch-af +++ b/databases/msql/files/patch-af @@ -1,15 +1,67 @@ --- src/msql/Makefile.tmpl.orig Thu Aug 19 07:33:13 1999 -+++ src/msql/Makefile.tmpl Sat Jan 27 11:04:06 2001 -@@ -67,7 +67,7 @@ - !object select_test.o select_test.c - !program select_test select_test.o,libmsql.a ++++ src/msql/Makefile.tmpl Sun Jan 28 00:11:52 2001 +@@ -34,57 +34,59 @@ + + !dll_os2 msql libmsql.c,net.c,config.c,time.c ../common/strlib.o,../common/tmpnam.o,../common/strerror.o,../common/strptime.o,../common/snprintf.o + !library_unix libmsql.a libmsql.c,net.c,config.c,time.c ../common/strlib.o,../common/tmpnam.o,../common/strerror.o,../common/strptime.o,../common/snprintf.o +- +-all: ../lib/libmsql.a +- +-../lib/libmsql.a : libmsql.a +- rm -f ../lib/libmsql.a +- cp ../msql/libmsql.a ../lib/libmsql.a +- $(RANLIB) ../lib/libmsql.a ++!slibrary_unix 1 libmsql.so libmsql.c,net.c,config.c,time.c ../common/strlib.o,../common/tmpnam.o,../common/strerror.o,../common/strptime.o,../common/snprintf.o + + + !object msqladmin.o msqladmin.c +-!program msqladmin msqladmin.o,acl.o,libmsql.a ++!program msqladmin msqladmin.o,acl.o -L.,-lmsql ++msqladmin: libmsql.so + + !object msql.o msql.c +-!program msql msql.o,libmsql.a ++!program msql msql.o -L.,-lmsql ++msql: libmsql.so + + !object msqldump.o msqldump.c +-!program msqldump msqldump.o,libmsql.a ++!program msqldump msqldump.o -L.,-lmsql ++msqldump: libmsql.so + !object msqlexport.o msqlexport.c +-!program msqlexport msqlexport.o,libmsql.a ++!program msqlexport msqlexport.o -L.,-lmsql ++msqlexport: libmsql.so + + !object msqlimport.o msqlimport.c +-!program msqlimport msqlimport.o,libmsql.a ++!program msqlimport msqlimport.o -L.,-lmsql ++msqlimport: libmsql.so + + !object relshow.o relshow.c +-!program relshow relshow.o,libmsql.a ++!program relshow relshow.o -L.,-lmsql ++relshow: libmsql.so + + !object insert_test.o insert_test.c +-!program insert_test insert_test.o,libmsql.a ++!program insert_test insert_test.o -L.,-lmsql ++insert_test: libmsql.so + + !object select_test.o select_test.c +-!program select_test select_test.o,libmsql.a +- -!program msql2d msqld.o,msql_yacc.o,msql_lex.o,msql_proc.o,net.o,msqldb.o,acl.o,index.o,types.o,regex.o,varchar.o,memory.o,table.o,select.o,cra.o,sort.o,distinct.o,sysvar.o,funct.o,avl_tree.o ../common/debug.o,../common/strtoul.o,-lregexp,libmsql.a -+!program msql2d msqld.o,msql_yacc.o,msql_lex.o,msql_proc.o,net.o,msqldb.o,acl.o,index.o,types.o,regex.o,varchar.o,memory.o,table.o,select.o,cra.o,sort.o,distinct.o,sysvar.o,funct.o,avl_tree.o ../common/debug.o,../common/strtoul.o,-lcompat,libmsql.a ++!program select_test select_test.o -L.,-lmsql ++select_test: libmsql.so - msql2d: libmsql.a +-msql2d: libmsql.a ++!program msql2d msqld.o,msql_yacc.o,msql_lex.o,msql_proc.o,net.o,msqldb.o,acl.o,index.o,types.o,regex.o,varchar.o,memory.o,table.o,select.o,cra.o,sort.o,distinct.o,sysvar.o,funct.o,avl_tree.o ../common/debug.o,../common/strtoul.o,-lcompat,-L.,-lmsql ++msql2d: libmsql.so -@@ -76,7 +76,7 @@ + msqld-clean: + rm -f msqld.o msql_yacc.o msql_lex.o msql_proc.o net.o \ msqldb.o !install msql $(INST_DIR)/bin/msql 0755 @@ -18,9 +70,10 @@ !install msqladmin $(INST_DIR)/bin/msqladmin 0750 $(ROOT) !install msqlexport $(INST_DIR)/bin/msqlexport 0750 $(ROOT) !install msqlimport $(INST_DIR)/bin/msqlimport 0750 $(ROOT) -@@ -84,7 +84,7 @@ + !install relshow $(INST_DIR)/bin/relshow 0755 $(ROOT) !install msqldump $(INST_DIR)/bin/msqldump 0755 $(ROOT) !libinstall libmsql.a $(INST_DIR)/lib/libmsql.a 744 $(ROOT) ++!slibinstall 1 libmsql.so $(INST_DIR)/lib 744 $(ROOT) !install msql.h $(INST_DIR)/include/msql.h 744 $(ROOT) -!install sample.acl $(INST_DIR)/msql.acl.sample 700 $(ROOT) +!install sample.acl $(INST_DIR)/etc/msql2/msql.acl.sample 700 $(ROOT) diff --git a/databases/msql/files/patch-ak b/databases/msql/files/patch-ak index 5004489d2098..5a8adfa53822 100644 --- a/databases/msql/files/patch-ak +++ b/databases/msql/files/patch-ak @@ -1,11 +1,14 @@ ---- src/w3-msql/Makefile.tmpl.bak Thu Aug 19 07:33:22 1999 -+++ src/w3-msql/Makefile.tmpl Sat Jan 27 08:36:58 2001 -@@ -14,7 +14,7 @@ +--- src/w3-msql/Makefile.tmpl.orig Thu Aug 19 07:33:22 1999 ++++ src/w3-msql/Makefile.tmpl Sat Jan 27 23:54:43 2001 +@@ -14,9 +14,9 @@ !object w3-msql.o w3-msql.c !object w3-auth.o w3-auth.c -!program w3-msql mod_w3msql.o,w3-msql.o,lexer.o,modules.o,auth.o,http.o,../lang-common/mod_std.o,../lang-common/mod_msql.o,../lang-common/liblite.a,../msql/libmsql.a,../regexp/libregexp.a -+!program w3-msql mod_w3msql.o,w3-msql.o,lexer.o,modules.o,auth.o,http.o,../lang-common/mod_std.o,../lang-common/mod_msql.o,../lang-common/liblite.a,../msql/libmsql.a,-lcompat ++!program w3-msql mod_w3msql.o,w3-msql.o,lexer.o,modules.o,auth.o,http.o ../lang-common/mod_std.o,../lang-common/mod_msql.o,-L../lang-common,-llite,-L../msql,-lmsql,-lcompat - !program w3-auth w3-auth.o,http.o,../lang-common/fcrypt.o,../msql/libmsql.a +-!program w3-auth w3-auth.o,http.o,../lang-common/fcrypt.o,../msql/libmsql.a ++!program w3-auth w3-auth.o,http.o ../lang-common/fcrypt.o,-L../msql,-lmsql + + # diff --git a/databases/msql/files/patch-as b/databases/msql/files/patch-as index 3b8259372891..cfb42bc4b79d 100644 --- a/databases/msql/files/patch-as +++ b/databases/msql/files/patch-as @@ -1,16 +1,11 @@ --- src/lite/Makefile.tmpl.orig Thu Aug 19 07:33:12 1999 -+++ src/lite/Makefile.tmpl Sat Jan 27 11:16:03 2001 -@@ -10,11 +10,11 @@ - - !object lite.o lite.c - !object lite_lex.o lite_lex.c --!object mod_lite.o mod_lite.c -+!sobject mod_lite.o mod_lite.c ++++ src/lite/Makefile.tmpl Sat Jan 27 23:52:24 2001 +@@ -14,7 +14,7 @@ !object modules.o modules.c -!program lite mod_lite.o,../lang-common/mod_std.o,../lang-common/mod_msql.o,lite.o,lite_lex.o,modules.o,../msql/libmsql.a,../regexp/libregexp.a,../lang-common/liblite.a -+!program lite mod_lite.o,../lang-common/mod_std.o,../lang-common/mod_msql.o,lite.o,lite_lex.o,modules.o,../msql/libmsql.a,../lang-common/liblite.a,-lcompat ++!program lite mod_lite.o,../lang-common/mod_std.o,../lang-common/mod_msql.o,lite.o,lite_lex.o,modules.o -L../msql,-lmsql,-L../lang-common,-llite,-lcompat # # Debugging compilations diff --git a/databases/msql/files/patch-ax b/databases/msql/files/patch-ax index e9ec2ca87308..9efdeb865cbe 100644 --- a/databases/msql/files/patch-ax +++ b/databases/msql/files/patch-ax @@ -1,20 +1,16 @@ --- src/lang-common/Makefile.tmpl.orig Thu Aug 19 07:33:10 1999 -+++ src/lang-common/Makefile.tmpl Sat Jan 27 11:12:34 2001 -@@ -15,15 +15,15 @@ - - !yacc parser.y - --!object mod_std.o mod_std.c --!object mod_msql.o mod_msql.c -+!sobject mod_std.o mod_std.c -+!sobject mod_msql.o mod_msql.c ++++ src/lang-common/Makefile.tmpl Sun Jan 28 00:17:00 2001 +@@ -19,11 +19,13 @@ + !object mod_msql.o mod_msql.c !library_unix liblite.a symtab.c,types.c,code-gen.c,code-sim.c,extern.c,fcrypt.c,lib.c parser.o ++!slibrary_unix 1 liblite.so symtab.c,types.c,code-gen.c,code-sim.c,extern.c,fcrypt.c,lib.c parser.o !dll_os2 lite symtab.c,types.c,code-sim.c,extern.c,fcrypt.c,lib.c,code-gen.c,parser.c ../regexp/libregexp.a !libinstall liblite.a $(INST_DIR)/lib/liblite.a 744 $(ROOT) -!install mod_std.o $(INST_DIR)/lib/mod_std.o 744 $(ROOT) -!install mod_msql.o $(INST_DIR)/lib/mod_msql.o 744 $(ROOT) ++!slibinstall 1 liblite.so $(INST_DIR)/lib 744 $(ROOT) +!install mod_std.o $(INST_DIR)/libexec/msql/mod_std.so 744 $(ROOT) +!install mod_msql.o $(INST_DIR)/libexec/msql/mod_msql.so 744 $(ROOT) !install mod_std.h $(INST_DIR)/include/mod_std.h 744 $(ROOT) diff --git a/databases/msql/files/slibinstall.mm b/databases/msql/files/slibinstall.mm new file mode 100644 index 000000000000..7349f3e65c41 --- /dev/null +++ b/databases/msql/files/slibinstall.mm @@ -0,0 +1,27 @@ +#!/bin/sh + +. $MACRO_DIR/makegen/makegen.cf + +maj=$1 +src=$2 +destd=$3 +mode=$4 +owner=$5 +group=$6 + +echo "install ::" +echo " cp $src.$maj $destd/$src.$maj" +echo " ln -sf $src.$maj $destd/$src" +if test "$mode." != "." +then + echo " $chmod $mode $destd/$src.$maj" +fi +if test "$owner." = "root." +then + echo " $chown $owner $destd/$src.$maj" +fi +if test "$group." != "." +then + echo " $chgrp $group $destd/$src.$maj" +fi +echo diff --git a/databases/msql/files/slibrary_unix.mm b/databases/msql/files/slibrary_unix.mm new file mode 100644 index 000000000000..9d6ea4350d64 --- /dev/null +++ b/databases/msql/files/slibrary_unix.mm @@ -0,0 +1,51 @@ +#!/bin/sh + +. $MACRO_DIR/makegen/makegen.cf + +if test $OS_TYPE != "_OS_UNIX" +then + exit +fi + + +if echo '\c' | grep -s c >/dev/null 2>&1 +then + ECHO_N="echo -n" + ECHO_C="" +else + ECHO_N="echo" + ECHO_C='\c' +fi + + +maj=$1 +lib=$2 +libsrc=`echo $3 | sed "s/,/ /g"` +libobj=`echo $4 | sed "s/,/ /g"` + +for src in $libsrc +do + if test -c /dev/tty + then + $ECHO_N ".$ECHO_C" > /dev/tty + fi + base=`echo $src | sed "s/\..*//"` + obj=`echo $src | sed "s/\.c\$/.o/"` + libobj="$libobj $obj" + echo "$obj : $src Makefile.full" + echo ' $(CC) $(CC_FLAGS) -o '"$obj"' -c '"$src" + echo + echo "clean ::" + echo " rm -f $obj" + echo +done + +echo "all : $lib" +echo +echo "$lib : $libobj Makefile.full" +echo ' $(CC) -shared -Wl,-x '"-o $lib.$maj -Wl,-soname,$lib.$maj $libobj" +echo " ln -sf $lib.$maj $lib" +echo +echo "clean :: " +echo " rm -f $lib $lib.$maj" +echo diff --git a/databases/msql/files/sobject.mm b/databases/msql/files/sobject.mm deleted file mode 100644 index 66fe3a45de27..000000000000 --- a/databases/msql/files/sobject.mm +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -. $MACRO_DIR/makegen/makegen.cf - -obj=$1 -src=$2 -shift; shift -deps=$* - -base=`echo $src | sed "s/\..*//"` - -echo -echo "# Make rules for building $obj" -echo -echo "$obj : $src Makefile.full $deps" -echo ' $(CC) $(CC_FLAGS) -fpic -DPIC -o '$obj' -c $(SOURCE_DIR)'/$src -echo -echo "clean ::" -echo " rm -f $obj $base.lint" -echo diff --git a/databases/msql/pkg-plist b/databases/msql/pkg-plist index f4c79750cc29..a520c024efa2 100644 --- a/databases/msql/pkg-plist +++ b/databases/msql/pkg-plist @@ -18,7 +18,13 @@ include/mod_msql.h include/mod_std.h include/msql.h lib/liblite.a +lib/liblite.so.1 +@exec ln -sf %f %B/liblite.so +@unexec rm -f %B/liblite.so lib/libmsql.a +lib/libmsql.so.1 +@exec ln -sf %f %B/libmsql.so +@unexec rm -f %B/libmsql.so lib/lite_lex.o libexec/msql/mod_lite.so libexec/msql/mod_msql.so @@ -54,9 +60,10 @@ share/msql/makegen/makegen share/msql/makegen/makegen.cf share/msql/makegen/makegen.cf.in share/msql/makegen/object.mm -share/msql/makegen/sobject.mm share/msql/makegen/program.mm share/msql/makegen/site.mm +share/msql/makegen/slibinstall.mm +share/msql/makegen/slibrary_unix.mm share/msql/makegen/touch.mm share/msql/makegen/yacc.mm share/msql/misc/setup_w3auth |