From 0a39cf46cfb68500c3e9e32c0c367f25c7e841bf Mon Sep 17 00:00:00 2001 From: naddy Date: Sun, 8 Apr 2001 17:41:43 +0000 Subject: [PATCH] sync libtool patches, build shared libraries; ok maintainer --- devel/gtl/Makefile | 6 +- devel/gtl/patches/patch-aux_ltcf-c_sh | 37 +++++++++++ devel/gtl/patches/patch-aux_ltcf-cxx_sh | 65 +++++++++++++++++++ devel/gtl/patches/patch-aux_ltconfig | 18 ++++++ devel/gtl/patches/patch-aux_ltmain_sh | 84 +++++++++++++++++++++++++ devel/gtl/patches/patch-ltconfig | 52 +++++++++++++++ devel/gtl/patches/patch-ltmain_sh | 84 +++++++++++++++++++++++++ devel/gtl/patches/patch-src_Makefile_in | 8 +-- devel/gtl/pkg/PFRAG.shared | 3 + devel/gtl/pkg/PLIST | 3 +- 10 files changed, 352 insertions(+), 8 deletions(-) create mode 100644 devel/gtl/patches/patch-aux_ltcf-c_sh create mode 100644 devel/gtl/patches/patch-aux_ltcf-cxx_sh create mode 100644 devel/gtl/patches/patch-aux_ltconfig create mode 100644 devel/gtl/patches/patch-aux_ltmain_sh create mode 100644 devel/gtl/patches/patch-ltconfig create mode 100644 devel/gtl/patches/patch-ltmain_sh create mode 100644 devel/gtl/pkg/PFRAG.shared diff --git a/devel/gtl/Makefile b/devel/gtl/Makefile index 753244a2405..f359f4fe5e6 100644 --- a/devel/gtl/Makefile +++ b/devel/gtl/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.5 2001/03/24 12:51:47 reinhard Exp $ +# $OpenBSD: Makefile,v 1.6 2001/04/08 17:41:43 naddy Exp $ COMMENT= 'c++ graph data template library based on the stl' -PKGNAME= gtl-1.0.0 +PKGNAME= ${DISTNAME:L} DISTNAME= GTL-1.0.0 CATEGORIES= devel NEED_VERSION= 1.363 @@ -19,7 +19,7 @@ HOMEPAGE= http://infosun.fmi.uni-passau.de/GTL/ MASTER_SITES= #see_do-fetch_target CONFIGURE_STYLE= gnu -MAKE_ENV+= GTL_VERS="1.0.0" +CONFIGURE_ARGS= ${CONFIGURE_SHARED} --enable-static do-fetch: @if [ ! -f ${DISTDIR}/${DISTFILES} ]; then \ diff --git a/devel/gtl/patches/patch-aux_ltcf-c_sh b/devel/gtl/patches/patch-aux_ltcf-c_sh new file mode 100644 index 00000000000..73c35e3df1e --- /dev/null +++ b/devel/gtl/patches/patch-aux_ltcf-c_sh @@ -0,0 +1,37 @@ +$OpenBSD: patch-aux_ltcf-c_sh,v 1.1 2001/04/08 17:41:44 naddy Exp $ +--- aux/ltcf-c.sh.orig Wed Dec 27 13:58:38 2000 ++++ aux/ltcf-c.sh Sun Apr 8 02:58:48 2001 +@@ -47,6 +47,9 @@ cygwin* | mingw*) + with_gnu_ld=no + fi + ;; ++openbsd*) ++ with_gnu_ld=no ++ ;; + + esac + +@@ -378,10 +381,21 @@ else + ;; + + openbsd*) +- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' +- hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then ++ export_dynamic_flag_spec='${wl}-E' ++ fi ++ ;; ++ esac + ;; + + os2*) diff --git a/devel/gtl/patches/patch-aux_ltcf-cxx_sh b/devel/gtl/patches/patch-aux_ltcf-cxx_sh new file mode 100644 index 00000000000..a2f4b109236 --- /dev/null +++ b/devel/gtl/patches/patch-aux_ltcf-cxx_sh @@ -0,0 +1,65 @@ +$OpenBSD: patch-aux_ltcf-cxx_sh,v 1.1 2001/04/08 17:41:44 naddy Exp $ +--- aux/ltcf-cxx.sh.orig Wed Dec 27 13:58:38 2000 ++++ aux/ltcf-cxx.sh Sun Apr 8 02:58:54 2001 +@@ -54,6 +54,13 @@ set dummy $CC + compiler=$2 + cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + ++case "$host_os" in ++ openbsd*) ++ with_gnu_ld=no ++ ;; ++ ++esac ++ + # Check if we are using GNU gcc (taken/adapted from configure script) + # We need to check here since "--with-gcc" is set at configure time, + # not ltconfig time! +@@ -67,6 +74,7 @@ if { ac_try='${CC-c++} -E conftest.$ac_e + + # Set up default GNU C++ configuration + ++ if test "$with_gnu_ld" != no; then + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if eval "`$CC -print-prog-name=ld` --version 2>&1" | \ +@@ -91,6 +99,7 @@ if { ac_try='${CC-c++} -E conftest.$ac_e + else + whole_archive_flag_spec= + fi ++ fi + else + with_gnu_ld=no + wlarc= +@@ -300,6 +309,22 @@ case "$host_os" in + netbsd*) + # NetBSD uses g++ - do we need to do anything? + ;; ++ openbsd*) ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ ld_shlibs=no ++ ;; ++ *) ++ wlarc='${wl}' ++ archive_cmds='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ output_verbose_link_cmds='$CC -shared $pic_flag $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"' ++ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then ++ export_dynamic_flag_spec='${wl}-E' ++ fi ++ ;; ++ esac ++ ;; + osf3*) + if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' +@@ -695,6 +720,8 @@ else + esac + ;; + netbsd*) ++ ;; ++ openbsd*) + ;; + osf3* | osf4* | osf5*) + case "$cc_basename" in diff --git a/devel/gtl/patches/patch-aux_ltconfig b/devel/gtl/patches/patch-aux_ltconfig new file mode 100644 index 00000000000..60198d90a74 --- /dev/null +++ b/devel/gtl/patches/patch-aux_ltconfig @@ -0,0 +1,18 @@ +$OpenBSD: patch-aux_ltconfig,v 1.1 2001/04/08 17:41:44 naddy Exp $ +--- aux/ltconfig.orig Wed Dec 27 13:58:38 2000 ++++ aux/ltconfig Sun Apr 8 02:59:00 2001 +@@ -1126,13 +1126,10 @@ netbsd*) + + openbsd*) + version_type=sunos +- if test "$with_gnu_ld" = yes; then +- need_lib_prefix=no +- need_version=no +- fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH ++ deplibs_check_method='pass_all' + ;; + + os2*) diff --git a/devel/gtl/patches/patch-aux_ltmain_sh b/devel/gtl/patches/patch-aux_ltmain_sh new file mode 100644 index 00000000000..3d04056d986 --- /dev/null +++ b/devel/gtl/patches/patch-aux_ltmain_sh @@ -0,0 +1,84 @@ +$OpenBSD: patch-aux_ltmain_sh,v 1.1 2001/04/08 17:41:44 naddy Exp $ +--- aux/ltmain.sh.orig Wed Dec 27 13:58:38 2000 ++++ aux/ltmain.sh Sun Apr 8 02:59:04 2001 +@@ -1097,7 +1097,18 @@ EOF + # These systems don't actually have c library (as such) + continue + ;; ++ *-*-openbsd*) ++ # Do not include libc due to us having libc/libc_r. ++ continue ++ ;; + esac ++ elif test "$arg" = "-lc_r"; then ++ case "$host" in ++ *-*-openbsd*) ++ # Do not include libc_r directly, use -pthread flag. ++ continue ++ ;; ++ esac + elif test "$arg" = "-lm"; then + case "$host" in + *-*-cygwin* | *-*-pw32* | *-*-beos*) +@@ -1110,6 +1121,10 @@ EOF + continue + ;; + ++ -?thread) ++ deplibs="$deplibs $arg" ++ ;; ++ + -module) + module=yes + continue +@@ -2602,6 +2617,9 @@ EOF + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; ++ *-*-openbsd*) ++ # Do not include libc due to us having libc/libc_r. ++ ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test $build_libtool_need_lc = "yes"; then +@@ -4505,40 +4523,6 @@ relink_command=\"$relink_command\"" + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- echo " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval flag=\"$hardcode_libdir_flag_spec\" +- +- echo " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- echo " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo +- echo "See any operating system documentation about shared libraries for" +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- echo "----------------------------------------------------------------------" + exit 0 + ;; + diff --git a/devel/gtl/patches/patch-ltconfig b/devel/gtl/patches/patch-ltconfig new file mode 100644 index 00000000000..e6a07ee4242 --- /dev/null +++ b/devel/gtl/patches/patch-ltconfig @@ -0,0 +1,52 @@ +$OpenBSD: patch-ltconfig,v 1.1 2001/04/08 17:41:44 naddy Exp $ +--- ltconfig.orig Fri Mar 3 17:50:28 2000 ++++ ltconfig Sat Apr 7 22:17:21 2001 +@@ -1105,6 +1105,9 @@ cygwin* | mingw*) + with_gnu_ld=no + fi + ;; ++openbsd*) ++ with_gnu_ld=no ++ ;; + + esac + +@@ -1396,10 +1399,21 @@ else + ;; + + openbsd*) +- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' +- hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then ++ export_dynamic_flag_spec='${wl}-E' ++ fi ++ ;; ++ esac + ;; + + os2*) +@@ -1997,13 +2011,10 @@ netbsd*) + + openbsd*) + version_type=sunos +- if test "$with_gnu_ld" = yes; then +- need_lib_prefix=no +- need_version=no +- fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH ++ deplibs_check_method='pass_all' + ;; + + os2*) diff --git a/devel/gtl/patches/patch-ltmain_sh b/devel/gtl/patches/patch-ltmain_sh new file mode 100644 index 00000000000..2b2451563e5 --- /dev/null +++ b/devel/gtl/patches/patch-ltmain_sh @@ -0,0 +1,84 @@ +$OpenBSD: patch-ltmain_sh,v 1.1 2001/04/08 17:41:44 naddy Exp $ +--- ltmain.sh.orig Fri Mar 3 17:50:28 2000 ++++ ltmain.sh Sat Apr 7 22:17:26 2001 +@@ -1079,7 +1079,18 @@ compiler." + # These systems don't actually have c library (as such) + continue + ;; ++ *-*-openbsd*) ++ # Do not include libc due to us having libc/libc_r. ++ continue ++ ;; + esac ++ elif test "$arg" = "-lc_r"; then ++ case "$host" in ++ *-*-openbsd*) ++ # Do not include libc_r directly, use -pthread flag. ++ continue ++ ;; ++ esac + elif test "$arg" = "-lm"; then + case "$host" in + *-*-cygwin* | *-*-beos*) +@@ -1091,6 +1102,10 @@ compiler." + deplibs="$deplibs $arg" + ;; + ++ -?thread) ++ deplibs="$deplibs $arg" ++ ;; ++ + -module) + module=yes + continue +@@ -1795,6 +1810,9 @@ compiler." + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; ++ *-*-openbsd*) ++ # do not include libc due to us having libc/libc_r. ++ ;; + *) + # Add libc to deplibs on all other systems. + deplibs="$deplibs -lc" +@@ -3555,40 +3573,6 @@ libdir='$install_libdir'\ + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- echo " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval flag=\"$hardcode_libdir_flag_spec\" +- +- echo " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- echo " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo +- echo "See any operating system documentation about shared libraries for" +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- echo "----------------------------------------------------------------------" + exit 0 + ;; + diff --git a/devel/gtl/patches/patch-src_Makefile_in b/devel/gtl/patches/patch-src_Makefile_in index aad8f026df7..0fe3bc203b1 100644 --- a/devel/gtl/patches/patch-src_Makefile_in +++ b/devel/gtl/patches/patch-src_Makefile_in @@ -1,12 +1,12 @@ -$OpenBSD: patch-src_Makefile_in,v 1.2 2001/02/09 10:05:32 reinhard Exp $ ---- src/Makefile.in.orig Wed Feb 7 16:40:07 2001 -+++ src/Makefile.in Wed Feb 7 16:42:04 2001 +$OpenBSD: patch-src_Makefile_in,v 1.3 2001/04/08 17:41:44 naddy Exp $ +--- src/Makefile.in.orig Wed Dec 27 13:58:40 2000 ++++ src/Makefile.in Sun Apr 8 04:24:03 2001 @@ -123,7 +123,7 @@ libGTL_la_SOURCES = \ ratio_cut_partition.cpp -libGTL_la_LDFLAGS = -release $(MAJOR_VERSION).$(MINOR_VERSION).$(MINI_VERSION) -+libGTL_la_LDFLAGS = -release $(GTL_VERS) ++libGTL_la_LDFLAGS = -version-info @MAJOR_VERSION@:@MINOR_VERSION@:@MINI_VERSION@ subdir = src mkinstalldirs = $(SHELL) $(top_srcdir)/aux/mkinstalldirs CONFIG_CLEAN_FILES = diff --git a/devel/gtl/pkg/PFRAG.shared b/devel/gtl/pkg/PFRAG.shared new file mode 100644 index 00000000000..3f7b639060b --- /dev/null +++ b/devel/gtl/pkg/PFRAG.shared @@ -0,0 +1,3 @@ +@comment $OpenBSD: PFRAG.shared,v 1.3 2001/04/08 17:41:45 naddy Exp $ +lib/libGTL.so.1.0 +DYNLIBDIR(%B) diff --git a/devel/gtl/pkg/PLIST b/devel/gtl/pkg/PLIST index 59dcbf9673b..40befcde089 100644 --- a/devel/gtl/pkg/PLIST +++ b/devel/gtl/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.2 2001/02/09 10:05:33 reinhard Exp $ +@comment $OpenBSD: PLIST,v 1.3 2001/04/08 17:41:45 naddy Exp $ include/GTL/GTL.h include/GTL/algorithm.h include/GTL/bfs.h @@ -30,6 +30,7 @@ include/GTL/topsort.h include/GTL/version.h lib/libGTL.a lib/libGTL.la +%%SHARED%% share/doc/gtl/GML_error.html share/doc/gtl/GTL-GTL-h.html share/doc/gtl/GTL-algorithm-h.html