ports/106282: multimedia/libxine: fix pkg-config --libs output

Thierry Thomas thierry at FreeBSD.org
Sun Dec 3 23:30:51 UTC 2006


>Number:         106282
>Category:       ports
>Synopsis:       multimedia/libxine: fix pkg-config --libs output
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 03 23:30:47 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 6.2-PRERELEASE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sun Oct 1 18:37:56 CEST 2006 thierry at graf.pompo.net:/usr/obj/usr/src/sys/GRAF060511 i386


	
>Description:
	Libxine does not link with libiconv with `-liconv' but with the
	complete library name.

	The output of `pkg-config --libs libxine' is:

	-pthread /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib
	-L/usr/X11R6/lib -L/usr/local/lib -lxine -lz

	This is actually not a serious problem, but it makes fail the
	configuration of a new port that I'm preparing.

	After the hereunder proposed patch, pkg-config will report:

	-pthread -L/usr/X11R6/lib -L/usr/local/lib -lxine -lz -liconv

>How-To-Repeat:
	pkg-config --libs libxine

>Fix:
	Please consider the following patch:

--- libxine.diff begins here ---
diff -urN multimedia/libxine.orig/Makefile multimedia/libxine/Makefile
--- multimedia/libxine.orig/Makefile	Sun Dec  3 11:28:23 2006
+++ multimedia/libxine/Makefile	Sun Dec  3 22:54:26 2006
@@ -7,7 +7,7 @@
 
 PORTNAME=	xine
 PORTVERSION=	1.1.2
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	multimedia ipv6
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -53,7 +53,7 @@
 CONFIGURE_ARGS=	--with-w32-path=${LOCALBASE}/lib/win32 --enable-ipv6 \
 		--mandir=${PREFIX}/man --with-external-libmad \
 		--with-external-libdts
-INSTALLS_SHLIB=	yes
+USE_LDCONFIG=	yes
 
 MAN1=	xine-config.1
 MAN5=	xine.5
@@ -194,7 +194,7 @@
 .endif
 	@${ECHO_MSG} "===>"
 
-post-patch:
+pre-configure:
 	@${REINPLACE_CMD} -e \
 		's|THREAD_LIBS=.*$$|THREAD_LIBS="\$$THREAD_LIBS"|g ; \
 		 s|THREAD_CFLAGS=.*$$|THREAD_CFLAGS="\$$THREAD_CFLAGS"|g ; \
diff -urN multimedia/libxine.orig/files/patch-config.rpath multimedia/libxine/files/patch-config.rpath
--- multimedia/libxine.orig/files/patch-config.rpath	Thu Jan  1 01:00:00 1970
+++ multimedia/libxine/files/patch-config.rpath	Sun Dec  3 22:33:05 2006
@@ -0,0 +1,12 @@
+--- config.rpath.orig	Sat Jun 10 03:47:01 2006
++++ config.rpath	Sun Dec  3 22:32:18 2006
+@@ -162,6 +162,9 @@
+         ld_shlibs=no
+       fi
+       ;;
++    freebsd*)
++      hardcode_minus_L=yes
++      ;;
+     netbsd*)
+       ;;
+     solaris* | sysv5*)
diff -urN multimedia/libxine.orig/files/patch-configure multimedia/libxine/files/patch-configure
--- multimedia/libxine.orig/files/patch-configure	Sat Jul 29 20:00:05 2006
+++ multimedia/libxine/files/patch-configure	Sun Dec  3 22:48:34 2006
@@ -1,6 +1,28 @@
---- configure.orig	Sun Jul 23 21:25:31 2006
-+++ configure	Sun Jul 23 21:25:31 2006
-@@ -28905,7 +28905,7 @@
+--- configure.orig	Sun Jul  9 16:51:14 2006
++++ configure	Sun Dec  3 22:47:17 2006
+@@ -10070,6 +10070,12 @@
+       fi
+       ;;
+ 
++    freebsd* | kfreebsd*-gnu | dragonfly*)
++      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
++      hardcode_direct=no
++      hardcode_minus_L=yes
++      ;;
++
+     linux*)
+       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ 	tmp_addflag=
+@@ -23552,7 +23558,7 @@
+                     if test -z "$haveit"; then
+                       LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+                     fi
+-                    if test "$hardcode_minus_L" != no; then
++                    if test "$hardcode_minus_L" = no; then
+                                                                                         LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+                     else
+                                                                                                                                                                                 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+@@ -28905,7 +28911,7 @@
                   "ac_cv_lib_avcodec_pp_get_context" \
                   "ac_cv_lib_postproc_pp_get_context" \
                   "ac_cv_lib_avcodec_register_avcodec"; do
@@ -9,7 +31,7 @@
          done
  
                  if test "${ac_cv_header_avcodec_h+set}" = set; then
-@@ -38707,6 +38707,8 @@
+@@ -38707,6 +38713,8 @@
  
         CFLAGS="$ac_save_CFLAGS"
         LIBS="$ac_save_LIBS"
--- libxine.diff ends here ---

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



More information about the freebsd-ports-bugs mailing list