Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2011 02:52:08 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/162844: Update port: x11/xloadimage
Message-ID:  <20111125025208.80b9262f.tkato432@yahoo.com>
Resent-Message-ID: <201111241820.pAOIKMUV056635@freefall.freebsd.org>

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

>Number:         162844
>Category:       ports
>Synopsis:       Update port: x11/xloadimage
>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 Nov 24 18:20:22 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p3 i386
>Organization:
>Environment:
>Description:
- Add LICENSE
- Add MAKE_JOBS_SAFE
- Support MANPREFIX
- Fix handling configuration file

Remove file:
pkg-deinstall
pkg-install

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/x11/xloadimage/Makefile x11/xloadimage/Makefile
--- /usr/ports/x11/xloadimage/Makefile	2011-09-24 14:11:56.000000000 +0900
+++ x11/xloadimage/Makefile	2011-09-27 15:59:33.000000000 +0900
@@ -19,6 +19,8 @@
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	X11 Image Loading Utility
 
+LICENCE=	MIT
+
 LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphics/jpeg \
 		png.6:${PORTSDIR}/graphics/png \
 		tiff.4:${PORTSDIR}/graphics/tiff
@@ -32,9 +34,10 @@
 
 USE_XORG=	x11
 GNU_CONFIGURE=	yes
+MAKE_JOBS_SAFE=	yes
 
-LDFLAGS+=	-L${LOCALBASE}/lib
 CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
 
 MAN1=		xloadimage.1 uufilter.1
 MLINKS=		xloadimage.1 xsetbg.1 \
@@ -46,10 +49,10 @@
 		${WRKSRC}/png.c
 	@${REINPLACE_CMD} -e 's|TIFFHeader|TIFFHeaderClassic|g' \
 		${WRKSRC}/tiff.c
-	@cd ${WRKSRC}; ${MV} xloadimage.man xloadimage.man.old; \
-		${SED} -e s:/etc/X11/Xloadimage:${PREFIX}/etc/xloadimagerc: \
-		       -e s:/usr/lib/xloadimagerc:${PREFIX}/etc/xloadimagerc: \
-		< xloadimage.man.old > xloadimage.man
+	@${REINPLACE_CMD} -e \
+		's:/etc/X11/Xloadimage:${PREFIX}/etc/xloadimagerc: ; \
+		 s:/usr/lib/xloadimagerc:${PREFIX}/etc/xloadimagerc:' \
+		${WRKSRC}/xloadimage.man
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/xloadimage ${PREFIX}/bin
@@ -57,13 +60,11 @@
 		${LN} -sf xloadimage xsetbg && \
 		${LN} -sf xloadimage xview
 	${INSTALL_PROGRAM} ${WRKSRC}/uufilter ${PREFIX}/bin
-	${INSTALL_MAN} ${WRKSRC}/xloadimage.man ${PREFIX}/man/man1/xloadimage.1
-	${INSTALL_MAN} ${WRKSRC}/uufilter.man ${PREFIX}/man/man1/uufilter.1
-	${MKDIR} ${PREFIX}/share/examples/xloadimage
-	${INSTALL_DATA} ${WRKSRC}/xloadimagerc \
-		${PREFIX}/share/examples/xloadimage/xloadimagerc
-
-post-install:
-	@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+	${INSTALL_MAN} ${WRKSRC}/xloadimage.man ${MANPREFIX}/man/man1/xloadimage.1
+	${INSTALL_MAN} ${WRKSRC}/uufilter.man ${MANPREFIX}/man/man1/uufilter.1
+	${INSTALL_DATA} ${WRKSRC}/xloadimagerc ${PREFIX}/etc/xloadimagerc.sample
+.if !exists(${PREFIX}/etc/xloadimagerc)
+	@cd ${PREFIX}/etc && ${CP} -f xloadimagerc.sample xloadimagerc
+.endif
 
 .include <bsd.port.mk>
diff -urN /usr/ports/x11/xloadimage/pkg-deinstall x11/xloadimage/pkg-deinstall
--- /usr/ports/x11/xloadimage/pkg-deinstall	2001-07-24 10:09:06.000000000 +0900
+++ x11/xloadimage/pkg-deinstall	1970-01-01 09:00:00.000000000 +0900
@@ -1,53 +0,0 @@
-#!/bin/sh
-#
-# De-installation setup of xloadimage
-
-# exit on errors, use a sane path and install prefix
-#
-set -e
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-PREFIX=${PKG_PREFIX:-/usr/local}
-CONFIG_FILE=${PREFIX}/etc/xloadimagerc
-
-# Function: tell the user what they need to do to delete the port completely
-#
-do_notice()
-{
-    echo
-    echo "+---------------"
-    echo "| To completely deinstall the $1 package you need to perform"
-    echo "| these steps as root:"
-    echo "|"
-    echo "|       rm -f ${CONFIG_FILE}"
-    echo "|"
-    echo "| Do not do this if you plan on re-installing $1"
-    echo "| at some future time."
-    echo "+---------------"
-    echo
-}
-
-# Verify proper execution
-#
-if [ $# -ne 2 ]; then
-    echo "usage: $0 distname { DEINSTALL | POST-DEINSTALL }" >&2
-    exit 1
-fi
-
-# Verify/process the command
-#
-case $2 in
-    DEINSTALL)
-	if [ -f ${CONFIG_FILE} ]; then
-	    do_notice "$1"
-	fi
-	;;
-    POST-DEINSTALL)
-: nothing to post-deinstall for this port
-        ;;
-    *)
-	echo "usage: $0 distname { DEINSTALL | POST-DEINSTALL }" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff -urN /usr/ports/x11/xloadimage/pkg-install x11/xloadimage/pkg-install
--- /usr/ports/x11/xloadimage/pkg-install	2001-10-09 05:02:22.000000000 +0900
+++ x11/xloadimage/pkg-install	1970-01-01 09:00:00.000000000 +0900
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-# Pre/post-installation setup of xloadimage
-
-# exit on errors, use a sane path and install prefix
-#
-set -e
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-PREFIX=${PREFIX:-${PKG_PREFIX:-/usr/local}}
-CONFIG_FILE=${PREFIX}/etc/xloadimagerc
-SAMPLE_CONFIG_DIR=${PREFIX}/share/examples/xloadimage
-
-# Function: tell the user what they need to do to use the port just installed
-#
-do_notice()
-{
-    echo
-    echo "+---------------"
-    echo "| The existing $1 configuration file, ${CONFIG_FILE},"
-    echo "| has NOT been changed.  You may want to compare it to the"
-    echo "| current sample files in ${SAMPLE_CONFIG_DIR}"
-    echo "| and update your configuration as needed."
-    echo "+---------------"
-    echo
-}
-
-# Function: install configuration files
-#
-do_install()
-{
-    install -c -o root -g wheel ${SAMPLE_CONFIG_DIR}/xloadimagerc ${CONFIG_FILE}
-    echo
-    echo "+---------------"
-    echo "| The $1 configuration file, ${CONFIG_FILE},"
-    echo "| has been installed.  Please view this file and change"
-    echo "| the configuration to meet your needs"
-    echo "+---------------"
-    echo
-}
-
-# Verify proper execution
-#
-if [ $# -ne 2 ]; then
-    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
-    exit 1
-fi
-
-# Verify/process the command
-#
-case $2 in
-    PRE-INSTALL)
-	: nothing to pre-install for this port
-	;;
-    POST-INSTALL)
-	if [ -f ${CONFIG_FILE} ]; then
-	    do_notice "$1"
-	else
-	    do_install "$1"
-	fi
-	;;
-    *)
-	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff -urN /usr/ports/x11/xloadimage/pkg-plist x11/xloadimage/pkg-plist
--- /usr/ports/x11/xloadimage/pkg-plist	2006-06-06 12:48:30.000000000 +0900
+++ x11/xloadimage/pkg-plist	2011-09-13 15:53:13.000000000 +0900
@@ -2,6 +2,6 @@
 bin/xloadimage
 bin/xsetbg
 bin/xview
-etc/xloadimagerc
-%%EXAMPLESDIR%%/xloadimagerc
-@dirrm %%EXAMPLESDIR%%
+@unexec if cmp -s %D/etc/xloadimagerc.sample %D/etc/xloadimagerc; then rm -f %D/etc/xloadimagerc; fi
+etc/xloadimagerc.sample
+@exec if [ ! -f %D/etc/xloadimagerc ] ; then cp -p %D/%F %B/xloadimagerc; fi
>Release-Note:
>Audit-Trail:
>Unformatted:



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