ports/172017: graphics/imagesort: Fix build
KATO Tsuguru
tkato432 at yahoo.com
Tue Sep 25 18:10:29 UTC 2012
>Number: 172017
>Category: ports
>Synopsis: graphics/imagesort: Fix build
>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: Tue Sep 25 18:10:28 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: KATO Tsuguru
>Release: FreeBSD 7.4-RELEASE-p10 i386
>Organization:
>Environment:
>Description:
- Fix build
- Add LICENSE
- Add MAKE_JOBS_SAFE
- Support PLIST_FILES
Remove file:
files/patch-Makefile
pkg-plist
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/graphics/imagesort/Makefile graphics/imagesort/Makefile
--- /usr/ports/graphics/imagesort/Makefile 2012-06-14 05:55:51.000000000 +0900
+++ graphics/imagesort/Makefile 2012-09-25 03:34:40.000000000 +0900
@@ -1,36 +1,48 @@
-# New ports collection makefile for: imagesort
-# Date created: Apr 10, 2001
-# Whom: Mark Pulford <mark at kyne.com.au>
-#
+# Created by: Mark Pulford <mark at kyne.com.au>
# $FreeBSD: ports/graphics/imagesort/Makefile,v 1.19 2012/06/13 20:55:51 pav Exp $
-# $MCom: ports/graphics/imagesort/Makefile,v 1.1 2006/10/04 13:18:57 ahze Exp $
PORTNAME= imagesort
PORTVERSION= 2.0
PORTREVISION= 11
CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR= apps/graphics/viewers/X
+MASTER_SITES= SUNSITE/apps/graphics/viewers/X
MAINTAINER= ports at FreeBSD.org
COMMENT= A flexible X utility for managing many image files
-LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \
- png15:${PORTSDIR}/graphics/png \
- gif.5:${PORTSDIR}/graphics/giflib
+LICENSE= GPLv2
-BROKEN= does not compile
+LIB_DEPENDS= gif:${PORTSDIR}/graphics/giflib \
+ jpeg:${PORTSDIR}/graphics/jpeg \
+ png15:${PORTSDIR}/graphics/png
+
+OPTIONS_DEFINE= DOCS
USE_XORG= x11 xt
USE_GNOME= imlib
-CFLAGS:= ${CFLAGS} -I${LOCALBASE}/include
+MAKE_JOBS_SAFE= yes
+
+PORTDOCS= README imagesortrc.sample
+PLIST_FILES= bin/imagesort
+
+.include <bsd.port.options.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -e \
+ '/^CC/s| =| ?=| ; \
+ /^LIBS/s| =.*| = `imlib-config --libs`| ; \
+ /^CFLAGS/s| =.*| += `imlib-config --cflags`|' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e \
+ 's|unsigned int argc|int argc| ; \
+ s|^#endif.*|#endif|' ${WRKSRC}/imagesort.c
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/imagesort ${PREFIX}/bin
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/imagesort
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/imagesort
- ${INSTALL_DATA} ${WRKSRC}/imagesortrc.sample ${PREFIX}/share/doc/imagesort
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
.endif
.include <bsd.port.mk>
diff -urN /usr/ports/graphics/imagesort/files/patch-Makefile graphics/imagesort/files/patch-Makefile
--- /usr/ports/graphics/imagesort/files/patch-Makefile 2012-02-19 19:20:46.000000000 +0900
+++ graphics/imagesort/files/patch-Makefile 1970-01-01 09:00:00.000000000 +0900
@@ -1,20 +0,0 @@
---- Makefile.orig Tue Apr 10 18:16:03 2001
-+++ Makefile Tue Apr 10 18:18:54 2001
-@@ -7,15 +7,14 @@
-
- # you may need to change this if you lack gcc (in which case you may
- # not be able to compile at all
--CC = gcc
-
- # you'll probably have to dick with the libs, depending on how your imlib
- # is compiled. We default to including all of the extras supported by
- # imlib 1.9
--LIBS = -lX11 -lXext -lImlib -ljpeg -lm -lpng -ltiff -lz -lgif
-+LIBS = -lX11 -lXext -lImlib -ljpeg -lm -lpng -ltiff -lz -lgif
- #LIBS = -lImlib -lX11 -lXext -ljpeg -lgif -lm
-
--CFLAGS = -g -L$(XDIR)/lib -I$(XDIR)/include
-+CFLAGS += -L$(LOCALBASE)/lib -I$(LOCALBASE)/include
-
- all: imagesort.o
-
diff -urN /usr/ports/graphics/imagesort/pkg-plist graphics/imagesort/pkg-plist
--- /usr/ports/graphics/imagesort/pkg-plist 2001-06-05 17:21:53.000000000 +0900
+++ graphics/imagesort/pkg-plist 1970-01-01 09:00:00.000000000 +0900
@@ -1,4 +0,0 @@
-bin/imagesort
-%%PORTDOCS%%share/doc/imagesort/README
-%%PORTDOCS%%share/doc/imagesort/imagesortrc.sample
-%%PORTDOCS%%@dirrm share/doc/imagesort
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list