Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 May 2006 12:38:59 -0400 (EDT)
From:      Rong-En Fan <rafan@infor.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        cjh@FreeBSD.org
Subject:   ports/96782: [PATCH] print/magicfilter: link against correct libmagic on 5.x
Message-ID:  <200605041638.k44GcxZc089197@woodstock.rafan.org>
Resent-Message-ID: <200605041640.k44GeC9Z073720@freefall.freebsd.org>

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

>Number:         96782
>Category:       ports
>Synopsis:       [PATCH] print/magicfilter: link against correct libmagic on 5.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 04 16:40:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Rong-En Fan
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
NTU CSIE
>Environment:
System: FreeBSD woodstock.rafan.org 7.0-CURRENT FreeBSD 7.0-CURRENT #33: Wed May  3 00:20:49 EDT
>Description:
On 5.x, we have libmagic.so.1 in the base. This is the same name as
the on sysutils/file installs. When linking, it will use the sysutils/file's
due to we added -L. However, for run-time, we have to specify -rpath for
ld(1), so magicfilter can find the correct libmagic.so.1.

Since we require ports's libmagic when build, make it as build dependency,
also for run dependency. Remove the LIB_DEPENDS on libmagic.so.1, it
will somehow conflict with the base's.

Bump PORTREVISION, so users on 5.x can have a correct linked magicfilter.

Port maintainer (cjh@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.76
>How-To-Repeat:
>Fix:

--- magicfilter-2.3.h_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/print/magicfilter/Makefile /home/rafan/tmp/ports/magicfilter/Makefile
--- /usr/ports/print/magicfilter/Makefile	Tue May  2 18:49:02 2006
+++ /home/rafan/tmp/ports/magicfilter/Makefile	Thu May  4 12:28:29 2006
@@ -7,14 +7,15 @@
 
 PORTNAME=	magicfilter
 PORTVERSION=	2.3.h
+PORTREVISION=	1
 CATEGORIES=	print
 MASTER_SITES=	http://www.pell.portland.or.us/~orc/Code/magicfilter/
 
 MAINTAINER=	cjh@FreeBSD.org
 COMMENT=	Customizable, extensible automatic printer filter
 
-LIB_DEPENDS=	magic.1:${PORTSDIR}/sysutils/file
-RUN_DEPENDS=	${LOCALBASE}/bin/file:${PORTSDIR}/sysutils/file
+BUILD_DEPENDS=	${LOCALBASE}/lib/libmagic.so:${PORTSDIR}/sysutils/file
+RUN_DEPENDS=	${BUILD_DEPENDS}
 
 USE_GHOSTSCRIPT=	yes
 
diff -ruN --exclude=CVS /usr/ports/print/magicfilter/files/patch-configure.sh /home/rafan/tmp/ports/magicfilter/files/patch-configure.sh
--- /usr/ports/print/magicfilter/files/patch-configure.sh	Mon May  1 21:50:19 2006
+++ /home/rafan/tmp/ports/magicfilter/files/patch-configure.sh	Thu May  4 12:27:42 2006
@@ -15,7 +15,7 @@
 -    AC_SUB MAGIC_HEADER ""
 -    AC_SUB MAGIC_LIB ""
 +    AC_SUB MAGIC_HEADER "-I${LOCALBASE}/include"
-+    AC_SUB MAGIC_LIB "-L${LOCALBASE}/lib"
++    AC_SUB MAGIC_LIB "-L${LOCALBASE}/lib -Wl,-rpath -Wl,${LOCALBASE}/lib"
      AC_SUB MAKE_MAGIC ":"
      AC_SUB CFMAGIC	""
  fi
--- magicfilter-2.3.h_1.patch ends here ---

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



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