Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Apr 2002 17:14:51 +0200 (CEST)
From:      Alex Dupre <sysadmin@alexdupre.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/37142: [Patch] devel/pth (use libtool and load shared libs)
Message-ID:  <200204161514.g3GFEpCd027630@vaio.alexdupre.com>

next in thread | raw e-mail | index | archive | help

>Number:         37142
>Category:       ports
>Synopsis:       [Patch] devel/pth (use libtool and load shared libs)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 16 08:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Alex Dupre
>Release:        FreeBSD 4.5-ALEXDUPRE i386
>Organization:
>Environment:
System: FreeBSD vaio.alexdupre.com 4.5-ALEXDUPRE FreeBSD 4.5-ALEXDUPRE #0: Fri Apr 12 14:12:57 CEST 2002 alex@vaio.alexdupre.com:/usr/obj/usr/src/sys/VAIO i386


	
>Description:
Fixed Makefile to use libtool and added a startup script to load shared
libraries in lib/pth.
Since pth is required by apache2+mod_php4 (future port) this patch should be
considered asap.
	
>How-To-Repeat:
	
>Fix:

	

--- pth.diff begins here ---
diff -ruN pth.orig/Makefile pth/Makefile
--- pth.orig/Makefile	Sun Mar 24 10:49:32 2002
+++ pth/Makefile	Tue Apr 16 17:01:44 2002
@@ -7,16 +7,17 @@
 
 PORTNAME=	pth
 PORTVERSION=	1.4.1
+PORTREVISION=	1
 CATEGORIES=	devel
-MASTER_SITES=	${MASTER_SITE_GNU} \
-		ftp://ftp.engelschall.com/sw/pth/
+MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	pth
 
 MAINTAINER=	ports@FreeBSD.org
 
+USE_LIBTOOL=	yes
+LIBTOOLFILES=	aclocal.m4
 INSTALLS_SHLIB=	yes
-LDCONFIG_DIRS=	%%PREFIX%%/lib/pth
-GNU_CONFIGURE=	yes
+LDCONFIG_DIRS=	${PREFIX}/lib/pth
 CONFIGURE_ARGS=	--enable-pthread \
 		--enable-syscall-soft \
 		--enable-optimize \
@@ -29,6 +30,9 @@
 
 post-build:
 	@${ECHO_MSG} "===>  Use 'make test' to run a quick test suite."
+
+post-install:
+	@${INSTALL_SCRIPT} ${FILESDIR}/pth.sh ${PREFIX}/etc/rc.d/000.pth.sh
 
 test:
 	@cd ${WRKSRC} && ${MAKE} test
diff -ruN pth.orig/files/patch-ltmain.sh pth/files/patch-ltmain.sh
--- pth.orig/files/patch-ltmain.sh	Thu Dec 20 07:18:58 2001
+++ pth/files/patch-ltmain.sh	Thu Jan  1 01:00:00 1970
@@ -1,28 +0,0 @@
-
-$FreeBSD: ports/devel/pth/files/patch-ltmain.sh,v 1.4 2001/12/20 06:18:58 sobomax Exp $
-
---- ltmain.sh	2001/08/27 09:51:26	1.1
-+++ ltmain.sh	2001/08/27 09:51:42
-@@ -2408,6 +2408,9 @@
- 	  *-*-netbsd*)
- 	    # Don't link with libc until the a.out ld.so is fixed.
- 	    ;;
-+	  *-*-freebsd*)
-+	    # FreeBSD doesn't need this...
-+	    ;;
- 	  *)
- 	    # Add libc to deplibs on all other systems if necessary.
- 	    if test "$build_libtool_need_lc" = "yes"; then
-@@ -4175,10 +4178,12 @@
- 	fi
- 
- 	# Install the pseudo-library for information purposes.
-+	if /usr/bin/false; then
- 	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- 	instname="$dir/$name"i
- 	$show "$install_prog $instname $destdir/$name"
- 	$run eval "$install_prog $instname $destdir/$name" || exit $?
-+	fi
- 
- 	# Maybe install the static library, too.
- 	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
diff -ruN pth.orig/files/pth.sh pth/files/pth.sh
--- pth.orig/files/pth.sh	Thu Jan  1 01:00:00 1970
+++ pth/files/pth.sh	Tue Apr 16 16:49:54 2002
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+    echo "$0: Cannot determine the PREFIX" >&2
+    exit 1
+fi
+
+case "$1" in
+	start)
+		/sbin/ldconfig -m ${PREFIX}/lib/pth
+		;;
+	stop)
+		;;
+	*)
+		echo ""
+		echo "Usage: `basename $0` { start | stop }"
+		echo ""
+		exit 64
+		;;
+esac
diff -ruN pth.orig/pkg-plist pth/pkg-plist
--- pth.orig/pkg-plist	Tue Sep 11 16:49:45 2001
+++ pth/pkg-plist	Tue Apr 16 16:59:56 2002
@@ -3,9 +3,11 @@
 include/pth/pth.h
 include/pth/pthread.h
 lib/pth/libpth.a
+lib/pth/libpth.la
 lib/pth/libpth.so
 lib/pth/libpth.so.14
 lib/pth/libpthread.a
+lib/pth/libpthread.la
 lib/pth/libpthread.so
 lib/pth/libpthread.so.14
 share/aclocal/pth.m4
--- pth.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204161514.g3GFEpCd027630>