ports/93270: [patch]jpeg support not working due to missing library path

Michael Winking mwfp at foldl.net
Mon Feb 13 09:20:14 UTC 2006


>Number:         93270
>Category:       ports
>Synopsis:       [patch]jpeg support not working due to missing library path
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 13 09:20:07 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Michael Winking <mwfp at foldl.net>
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:
System: FreeBSD Caesar.Imperium.Romanum 5.4-RELEASE FreeBSD 5.4-RELEASE #3: Mon Oct 17 22:30:51 CEST 2005 root at Caesar.Imperium.Romanum:/usr/src/sys/i386/compile/CAESAR i386


	
>Description:
	The configure script won't detect the installed jpeg, gif (and some other) libs, since /usr/local/lib is not in the linker path. This would later lead to a error  message, that jpeg is not supported, when one tries to load a jpeg image with 'let img = OImages.load "filename.jpg" [];;'.

>How-To-Repeat:
	when doing a "make build", looking at the configure output there will be "checking for jpeg_read_header in -ljpeg... no" because the linker won't search for libjpeg in /usr/local/lib.
>Fix:

	I have attached a diff to the Makefile which corrects the LDFLAGS, so that the library search path is correct.

	I have also modified the Makefile, so that the documentation gets installed	

--- ocaml-images.diff begins here ---
diff -ruN ocaml-images.bak/Makefile ocaml-images/Makefile
--- ocaml-images.bak/Makefile	Mon Feb 13 07:46:39 2006
+++ ocaml-images/Makefile	Mon Feb 13 08:04:36 2006
@@ -37,12 +37,21 @@
 CONFIGURE_ENV=	\
 	CPPFLAGS="${CXXFLAGS} -I${LOCALBASE}/include -I${X11BASE}/include" \
 	CFLAGS="${CFLAGS} -I${LOCALBASE}/include -I${X11BASE}/include" \
-	LDFLAGS="${LDFLAGS} -I${LOCALBASE}/include -I${X11BASE}/include"
+	LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -L${X11BASE}/lib"
 CONFIGURE_ARGS=	--includedir=${LOCALBASE}/include --includedir=${X11BASE}/include
 USE_GMAKE=	yes
 
 PKGDEINSTALL=	${PKGINSTALL}
 
+#the default docsdir gets expanded to ${PREFIX}/share/doc/images
+#which isn't of much help when you are searching for the package docs
+DOCSDIR=	${PREFIX}/share/doc/ocaml-images
+
+.if !defined(NOPORTDOCS)
+PORTDOCS=       Announce Announce-2.2 CHANGES INSTALL LICENSE doc
+.endif
+
+
 pre-everything::
 .if !defined(WITH_GHOSTSCRIPT_AFPL) || ${WITH_GHOSTSCRIPT_AFPL} != yes
 	@${ECHO_MSG} ""
@@ -52,6 +61,18 @@
 .endif
 
 post-install:
+.if !defined(NOPORTDOCS)
+	@${ECHO_MSG} -n ">> Installing documentation..."
+	@${MKDIR} ${DOCSDIR}
+	@cd ${WRKSRC} && ${FIND} doc \
+          | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} > /dev/null 2>&1
+	@${INSTALL_DATA} ${WRKSRC}/Announce ${DOCSDIR}/
+	@${INSTALL_DATA} ${WRKSRC}/Announce-2.2 ${DOCSDIR}/
+	@${INSTALL_DATA} ${WRKSRC}/CHANGES ${DOCSDIR}/
+	@${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}/
+	@${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}/
+	@${ECHO_MSG} " [DONE]"
+.endif
 	@${FIND} ${PREFIX}/lib/ocaml/camlimages -type f | \
 		${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
 	@${ECHO_CMD} "@dirrm lib/ocaml/camlimages" >> ${TMPPLIST}
diff -ruN ocaml-images.bak/pkg-descr ocaml-images/pkg-descr
--- ocaml-images.bak/pkg-descr	Mon Feb 13 07:46:39 2006
+++ ocaml-images/pkg-descr	Mon Feb 13 07:37:54 2006
@@ -3,3 +3,5 @@
 the library can handle huge images that cannot be (or can hardly be) stored
 into the memory (the library automatically creates swap files and escapes
 them to reduce the memory usage).
+
+WWW: http://pauillac.inria.fr/camlimages/
--- ocaml-images.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list