View | Details | Raw Unified | Return to bug 162844
Collapse All | Expand All

(-)x11/xloadimage/Makefile (-13 / +14 lines)
Lines 19-24 Link Here
19
MAINTAINER=	ports@FreeBSD.org
19
MAINTAINER=	ports@FreeBSD.org
20
COMMENT=	X11 Image Loading Utility
20
COMMENT=	X11 Image Loading Utility
21
21
22
LICENCE=	MIT
23
22
LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphics/jpeg \
24
LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphics/jpeg \
23
		png.6:${PORTSDIR}/graphics/png \
25
		png.6:${PORTSDIR}/graphics/png \
24
		tiff.4:${PORTSDIR}/graphics/tiff
26
		tiff.4:${PORTSDIR}/graphics/tiff
Lines 32-40 Link Here
32
34
33
USE_XORG=	x11
35
USE_XORG=	x11
34
GNU_CONFIGURE=	yes
36
GNU_CONFIGURE=	yes
37
MAKE_JOBS_SAFE=	yes
35
38
36
LDFLAGS+=	-L${LOCALBASE}/lib
37
CPPFLAGS+=	-I${LOCALBASE}/include
39
CPPFLAGS+=	-I${LOCALBASE}/include
40
LDFLAGS+=	-L${LOCALBASE}/lib
38
41
39
MAN1=		xloadimage.1 uufilter.1
42
MAN1=		xloadimage.1 uufilter.1
40
MLINKS=		xloadimage.1 xsetbg.1 \
43
MLINKS=		xloadimage.1 xsetbg.1 \
Lines 46-55 Link Here
46
		${WRKSRC}/png.c
49
		${WRKSRC}/png.c
47
	@${REINPLACE_CMD} -e 's|TIFFHeader|TIFFHeaderClassic|g' \
50
	@${REINPLACE_CMD} -e 's|TIFFHeader|TIFFHeaderClassic|g' \
48
		${WRKSRC}/tiff.c
51
		${WRKSRC}/tiff.c
49
	@cd ${WRKSRC}; ${MV} xloadimage.man xloadimage.man.old; \
52
	@${REINPLACE_CMD} -e \
50
		${SED} -e s:/etc/X11/Xloadimage:${PREFIX}/etc/xloadimagerc: \
53
		's:/etc/X11/Xloadimage:${PREFIX}/etc/xloadimagerc: ; \
51
		       -e s:/usr/lib/xloadimagerc:${PREFIX}/etc/xloadimagerc: \
54
		 s:/usr/lib/xloadimagerc:${PREFIX}/etc/xloadimagerc:' \
52
		< xloadimage.man.old > xloadimage.man
55
		${WRKSRC}/xloadimage.man
53
56
54
do-install:
57
do-install:
55
	${INSTALL_PROGRAM} ${WRKSRC}/xloadimage ${PREFIX}/bin
58
	${INSTALL_PROGRAM} ${WRKSRC}/xloadimage ${PREFIX}/bin
Lines 57-69 Link Here
57
		${LN} -sf xloadimage xsetbg && \
60
		${LN} -sf xloadimage xsetbg && \
58
		${LN} -sf xloadimage xview
61
		${LN} -sf xloadimage xview
59
	${INSTALL_PROGRAM} ${WRKSRC}/uufilter ${PREFIX}/bin
62
	${INSTALL_PROGRAM} ${WRKSRC}/uufilter ${PREFIX}/bin
60
	${INSTALL_MAN} ${WRKSRC}/xloadimage.man ${PREFIX}/man/man1/xloadimage.1
63
	${INSTALL_MAN} ${WRKSRC}/xloadimage.man ${MANPREFIX}/man/man1/xloadimage.1
61
	${INSTALL_MAN} ${WRKSRC}/uufilter.man ${PREFIX}/man/man1/uufilter.1
64
	${INSTALL_MAN} ${WRKSRC}/uufilter.man ${MANPREFIX}/man/man1/uufilter.1
62
	${MKDIR} ${PREFIX}/share/examples/xloadimage
65
	${INSTALL_DATA} ${WRKSRC}/xloadimagerc ${PREFIX}/etc/xloadimagerc.sample
63
	${INSTALL_DATA} ${WRKSRC}/xloadimagerc \
66
.if !exists(${PREFIX}/etc/xloadimagerc)
64
		${PREFIX}/share/examples/xloadimage/xloadimagerc
67
	@cd ${PREFIX}/etc && ${CP} -f xloadimagerc.sample xloadimagerc
65
68
.endif
66
post-install:
67
	@PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
68
69
69
.include <bsd.port.mk>
70
.include <bsd.port.mk>
(-)x11/xloadimage/pkg-deinstall (-53 lines)
Lines 1-53 Link Here
1
#!/bin/sh
2
#
3
# De-installation setup of xloadimage
4
5
# exit on errors, use a sane path and install prefix
6
#
7
set -e
8
PATH=/bin:/usr/bin:/sbin:/usr/sbin
9
PREFIX=${PKG_PREFIX:-/usr/local}
10
CONFIG_FILE=${PREFIX}/etc/xloadimagerc
11
12
# Function: tell the user what they need to do to delete the port completely
13
#
14
do_notice()
15
{
16
    echo
17
    echo "+---------------"
18
    echo "| To completely deinstall the $1 package you need to perform"
19
    echo "| these steps as root:"
20
    echo "|"
21
    echo "|       rm -f ${CONFIG_FILE}"
22
    echo "|"
23
    echo "| Do not do this if you plan on re-installing $1"
24
    echo "| at some future time."
25
    echo "+---------------"
26
    echo
27
}
28
29
# Verify proper execution
30
#
31
if [ $# -ne 2 ]; then
32
    echo "usage: $0 distname { DEINSTALL | POST-DEINSTALL }" >&2
33
    exit 1
34
fi
35
36
# Verify/process the command
37
#
38
case $2 in
39
    DEINSTALL)
40
	if [ -f ${CONFIG_FILE} ]; then
41
	    do_notice "$1"
42
	fi
43
	;;
44
    POST-DEINSTALL)
45
: nothing to post-deinstall for this port
46
        ;;
47
    *)
48
	echo "usage: $0 distname { DEINSTALL | POST-DEINSTALL }" >&2
49
	exit 1
50
	;;
51
esac
52
53
exit 0
(-)x11/xloadimage/pkg-install (-67 lines)
Lines 1-67 Link Here
1
#!/bin/sh
2
#
3
# Pre/post-installation setup of xloadimage
4
5
# exit on errors, use a sane path and install prefix
6
#
7
set -e
8
PATH=/bin:/usr/bin:/sbin:/usr/sbin
9
PREFIX=${PREFIX:-${PKG_PREFIX:-/usr/local}}
10
CONFIG_FILE=${PREFIX}/etc/xloadimagerc
11
SAMPLE_CONFIG_DIR=${PREFIX}/share/examples/xloadimage
12
13
# Function: tell the user what they need to do to use the port just installed
14
#
15
do_notice()
16
{
17
    echo
18
    echo "+---------------"
19
    echo "| The existing $1 configuration file, ${CONFIG_FILE},"
20
    echo "| has NOT been changed.  You may want to compare it to the"
21
    echo "| current sample files in ${SAMPLE_CONFIG_DIR}"
22
    echo "| and update your configuration as needed."
23
    echo "+---------------"
24
    echo
25
}
26
27
# Function: install configuration files
28
#
29
do_install()
30
{
31
    install -c -o root -g wheel ${SAMPLE_CONFIG_DIR}/xloadimagerc ${CONFIG_FILE}
32
    echo
33
    echo "+---------------"
34
    echo "| The $1 configuration file, ${CONFIG_FILE},"
35
    echo "| has been installed.  Please view this file and change"
36
    echo "| the configuration to meet your needs"
37
    echo "+---------------"
38
    echo
39
}
40
41
# Verify proper execution
42
#
43
if [ $# -ne 2 ]; then
44
    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
45
    exit 1
46
fi
47
48
# Verify/process the command
49
#
50
case $2 in
51
    PRE-INSTALL)
52
	: nothing to pre-install for this port
53
	;;
54
    POST-INSTALL)
55
	if [ -f ${CONFIG_FILE} ]; then
56
	    do_notice "$1"
57
	else
58
	    do_install "$1"
59
	fi
60
	;;
61
    *)
62
	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
63
	exit 1
64
	;;
65
esac
66
67
exit 0
(-)x11/xloadimage/pkg-plist (-3 / +3 lines)
Lines 2-7 Link Here
2
bin/xloadimage
2
bin/xloadimage
3
bin/xsetbg
3
bin/xsetbg
4
bin/xview
4
bin/xview
5
etc/xloadimagerc
5
@unexec if cmp -s %D/etc/xloadimagerc.sample %D/etc/xloadimagerc; then rm -f %D/etc/xloadimagerc; fi
6
%%EXAMPLESDIR%%/xloadimagerc
6
etc/xloadimagerc.sample
7
@dirrm %%EXAMPLESDIR%%
7
@exec if [ ! -f %D/etc/xloadimagerc ] ; then cp -p %D/%F %B/xloadimagerc; fi

Return to bug 162844