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

(-)e2fsprogs/Makefile (-47 / +43 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	e2fsprogs
8
PORTNAME=	e2fsprogs
9
PORTVERSION=	1.40.2
9
PORTVERSION=	1.40.2
10
PORTREVISION?=	0
10
PORTREVISION?=	1
11
CATEGORIES?=	sysutils
11
CATEGORIES?=	sysutils
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
12
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE_EXTENDED}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
13
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 15-44 Link Here
15
MAINTAINER?=	matthias.andree@gmx.de
15
MAINTAINER?=	matthias.andree@gmx.de
16
COMMENT?=	Utilities and library to manipulate ext2/ext3 filesystems
16
COMMENT?=	Utilities and library to manipulate ext2/ext3 filesystems
17
17
18
.if !defined(WITHOUT_NLS)
19
USE_GETTEXT=	yes
20
.endif
21
22
PATCH_STRIP=	-p1
18
PATCH_STRIP=	-p1
19
20
USE_LDCONFIG=	yes
23
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
24
CONFIGURE_ARGS?=	--disable-fsck --disable-e2initrd-helper \
22
CONFIGURE_ARGS?=--disable-fsck --disable-e2initrd-helper \
25
			'--with-ldopts=-L${LOCALBASE}/lib' \
23
		'--with-ldopts=-L${LOCALBASE}/lib' \
26
			--with-cc='${CC}' --with-linker='${LD}' \
24
		--with-cc='${CC}' --with-linker='${LD}' \
27
			--with-ccopts='${CFLAGS}' \
25
		--with-ccopts='${CFLAGS}' \
28
			--with-root-prefix='${PREFIX}'
26
		--with-root-prefix='${PREFIX}'
29
# for unknown reasons, the assembly bitops cause SIGSEGV.
27
# for unknown reasons, the assembly bitops cause SIGSEGV.
30
# _EXT2_USE_C_VERSIONS_ uses C bitops, these appear to work fine.
28
# _EXT2_USE_C_VERSIONS_ uses C bitops, these appear to work fine.
31
CONFIGURE_ENV+=	CPPFLAGS='${CPPFLAGS} -I${WRKSRC}/lib -I${LOCALBASE}/include -D_EXT2_USE_C_VERSIONS_'
29
CONFIGURE_ENV+=	CPPFLAGS='${CPPFLAGS} -I${WRKSRC}/lib \
32
.if defined(WITHOUT_NLS)
30
		-I${LOCALBASE}/include -D_EXT2_USE_C_VERSIONS_'
33
CONFIGURE_ARGS+=	--disable-nls
31
34
PLIST_SUB=	NLS="@comment "
32
OPTIONS=	NLS "Enable national language support" on
35
.else
36
MAKE_ARGS+=	STATIC_LIBS="../lib/libext2fs.a ../lib/libcom_err.a ../lib/libblkid.a  \
37
		../lib/libuuid.a ${LOCALBASE}/lib/libintl.a ${LOCALBASE}/lib/libiconv.a"
38
PLIST_SUB=	NLS=""
39
.endif
40
USE_LDCONFIG=	yes
41
PKGDEINSTALL=	${PKGINSTALL}
42
33
43
.if !defined(MASTERDIR)
34
.if !defined(MASTERDIR)
44
MAN1=	chattr.1 lsattr.1
35
MAN1=	chattr.1 lsattr.1
Lines 48-84 Link Here
48
	fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8 \
39
	fsck.ext2.8 fsck.ext3.8 mkfs.ext2.8 mkfs.ext3.8 \
49
	findfs.8 blkid.8 logsave.8 fsck_ext2fs.8
40
	findfs.8 blkid.8 logsave.8 fsck_ext2fs.8
50
41
51
pre-build:
52
	@${ECHO_CMD} "-------------------------------------------------------------"
53
.if defined(WITHOUT_NLS)
54
	@${ECHO_CMD} "National language support disabled, -DWITHOUT_NLS in effect. "
55
.else
56
	@${ECHO_CMD} "Use -DWITHOUT_NLS to build without national language support."
57
.endif
58
	@${ECHO_CMD} "-------------------------------------------------------------"
59
60
post-extract:
42
post-extract:
61
	${CHMOD} u+w ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot \
43
	@${CHMOD} u+w ${WRKSRC}/po/*.po ${WRKSRC}/po/*.pot \
62
		${WRKSRC}/${CONFIGURE_SCRIPT}
44
		${WRKSRC}/${CONFIGURE_SCRIPT}
63
.endif
45
.endif
64
46
65
.include <bsd.port.pre.mk>
47
.include <bsd.port.pre.mk>
66
48
49
.if defined(WITHOUT_NLS)
50
CONFIGURE_ARGS+=--disable-nls
51
PLIST_SUB=	NLS="@comment "
52
.else
53
USE_GETTEXT=	yes
54
MAKE_ARGS+=	STATIC_LIBS="../lib/libext2fs.a ../lib/libcom_err.a \
55
		../lib/libblkid.a  ../lib/libuuid.a \
56
		${LOCALBASE}/lib/libintl.a ${LOCALBASE}/lib/libiconv.a"
57
PLIST_SUB=	NLS=""
58
.endif
59
67
post-patch:
60
post-patch:
68
	${REINPLACE_CMD} -E -e 's:\$$\(libdir\)/pkgconfig:${PREFIX}/libdata/pkgconfig:' \
61
	@${REINPLACE_CMD} -Ee \
62
		's:\$$\(libdir\)/pkgconfig:${PREFIX}/libdata/pkgconfig:' \
69
		${WRKSRC}/lib/*/Makefile.in
63
		${WRKSRC}/lib/*/Makefile.in
70
	@: # disable uuidgen
64
# disable uuidgen and filefrag
71
	${REINPLACE_CMD} \
65
	@${REINPLACE_CMD} -Ee \
72
		-e 's/^\(UPROGS.*\) uuidgen\(.*\)/\1\2/' \
66
		's/^(UPROGS.*) uuidgen(.*)/\1\2/; \
73
		-e 's/^\(UMANPAGES.*\) uuidgen.1\(.*\)/\1\2/' \
67
		 s/^(UMANPAGES.*) uuidgen.1(.*)/\1\2/; \
68
		 s/^(USPROGS.*) filefrag(.*)/\1\2/; \
69
		 s/filefrag\.8 //' \
74
		${WRKSRC}/misc/Makefile.in
70
		${WRKSRC}/misc/Makefile.in
71
# don't build/install libext2fs.info
72
	@${REINPLACE_CMD} -e 's/ install-doc-libs$$//' ${WRKSRC}/Makefile.in
75
73
76
.if ${MASTERDIR} == ${.CURDIR}
74
.if ${MASTERDIR} == ${.CURDIR}
77
post-build:
75
post-build:
78
.if !defined(WITHOUT_NLS)
76
.if !defined(WITHOUT_NLS)
79
	cd ${WRKSRC}/po && ${MAKE} update-gmo
77
	cd ${WRKSRC}/po && ${MAKE} update-gmo
80
.endif
78
.endif
81
	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -s -static ${LIBS} -o ${WRKSRC}/fsck_ext2fs ${FILESDIR}/fsck_ext2fs.c
79
	${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -s -static ${LIBS} \
80
		-o ${WRKSRC}/fsck_ext2fs ${FILESDIR}/fsck_ext2fs.c
82
	cd ${WRKSRC}/tests && ${MAKE} check
81
	cd ${WRKSRC}/tests && ${MAKE} check
83
# While the ${MAKE} check can take a minute on an end user's system, the
82
# While the ${MAKE} check can take a minute on an end user's system, the
84
# correctness of tools such as e2fsck is critical to the health of the
83
# correctness of tools such as e2fsck is critical to the health of the
Lines 90-106 Link Here
90
# -- Matthias Andree, package maintainer, 2006-06-12
89
# -- Matthias Andree, package maintainer, 2006-06-12
91
90
92
post-install:
91
post-install:
93
	${RM} ${PREFIX}/sbin/filefrag
92
	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin
94
	${RM} ${PREFIX}/man/man8/filefrag.8
93
	${INSTALL_MAN} ${FILESDIR}/fsck_ext2fs.8 ${MANPREFIX}/man/man8
95
	${RM} ${PREFIX}/info/libext2fs.info.gz
96
	${INSTALL_PROGRAM} ${WRKSRC}/fsck_ext2fs ${PREFIX}/sbin/
97
	${INSTALL_MAN} ${FILESDIR}/fsck_ext2fs.8 ${PREFIX}/man/man8/
98
	[ -f ${PREFIX}/etc/mke2fs.conf ] || \
94
	[ -f ${PREFIX}/etc/mke2fs.conf ] || \
99
		${CP} -p ${PREFIX}/etc/mke2fs.conf.dist ${PREFIX}/etc/mke2fs.conf
95
		${CP} -p ${PREFIX}/etc/mke2fs.conf.dist \
100
	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
96
		${PREFIX}/etc/mke2fs.conf
101
	@${ECHO_MSG}
97
	cd ${PREFIX}/sbin && ${LN} -f fsck_ext2fs e2fsck /usr/sbin || \
102
	@${CAT} ${PKGMESSAGE}
98
		${INSTALL_PROGRAM} fsck_ext2fs e2fsck /usr/sbin 2>/dev/null
103
	@${ECHO_MSG}
99
	@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_MSG}
104
.endif
100
.endif
105
101
106
.include <bsd.port.post.mk>
102
.include <bsd.port.post.mk>
(-)e2fsprogs/pkg-install (-79 lines)
Removed Link Here
1
# $FreeBSD: ports/sysutils/e2fsprogs/pkg-install,v 1.1 2006/06/12 12:13:08 pav Exp $
2
#
3
# ports/sysutils/e2fsprogs/pkg-install - (C) 2006 by Matthias Andree
4
# redistributable under the modified BSD license
5
#
6
# ask() and yesno() based on ports/mail/postfix/pkg-install
7
8
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
9
BATCH=${BATCH:=no}
10
11
ask() {
12
        local question default answer
13
14
        question=$1
15
        default=$2
16
        if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then
17
                read -p "${question} [${default}]? " answer
18
        fi
19
        if [ x${answer} = x ]; then
20
                answer=${default}
21
        fi
22
        echo ${answer}
23
}
24
25
yesno() {
26
        local question default answer
27
28
        question=$1
29
        default=$2
30
        while :; do
31
                answer=$(ask "${question}" "${default}")
32
                case "${answer}" in
33
                        [Yy][Ee][SsPp]|[Yy])  return 0;;
34
                        [Nn]|[Nn][Oo])  return 1;;
35
                esac
36
                echo "Please answer yes or no."
37
        done
38
}
39
40
if [ "x$2" = xPOST-INSTALL ] && [ -z "${PACKAGE_BUILDING}" ]; then
41
	cat <<_EOF
42
43
To have your ext2 and ext3 filesystems fsck'ed correctly without explicitly
44
invoking the fsck_ext2fs utility installed by this port you will need to
45
create links or copy the fsck utilities installed by this port in/to /sbin, e.g.
46
47
ln -f "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/ 2>/dev/null \\
48
  || install -m755 "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/
49
ln -f "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck 2>/dev/null \\
50
  || install -m755 "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck
51
52
IMPORTANT: you also need to repeat the steps above after a port upgrade!
53
54
_EOF
55
56
	if yesno "Shall I create the links now?" yes ; then
57
		echo "Installing /sbin/fsck_ext2fs and /sbin/e2fsck."
58
		ln -f "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/ 2>/dev/null \
59
		  || install -m755 "${PKG_PREFIX}/sbin/fsck_ext2fs" /sbin/
60
		ln -f "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck 2>/dev/null \
61
		  || install -m755 "${PKG_PREFIX}/sbin/e2fsck" /sbin/e2fsck
62
	fi
63
fi
64
65
if [ "x$2" = xDEINSTALL ] ; then
66
	cat <<_EOF
67
68
If you are deinstalling the e2fsprogs port for good, rather than upgrading it,
69
remember to remove the files you may have installed into /sbin, example:
70
71
rm -f /sbin/fsck_ext2fs /sbin/e2fsck
72
73
_EOF
74
75
	if yesno "Shall I remove the links now?" yes ; then
76
		echo "Removing /sbin/fsck_ext2fs and /sbin/e2fsck."
77
		rm -f /sbin/fsck_ext2fs /sbin/e2fsck
78
	fi
79
fi
(-)e2fsprogs/pkg-message (+4 lines)
Lines 1-3 Link Here
1
==============================================================================
2
1
Note: this is a modified version of the e2fsprogs package, not the official
3
Note: this is a modified version of the e2fsprogs package, not the official
2
package. Report all building and run-time trouble that originates in the
4
package. Report all building and run-time trouble that originates in the
3
package to the port maintainer, <matthias.andree@gmx.de>.
5
package to the port maintainer, <matthias.andree@gmx.de>.
6
7
==============================================================================
(-)e2fsprogs/pkg-plist (+3 lines)
Lines 34-36 Link Here
34
%%NLS%%share/locale/tr/LC_MESSAGES/e2fsprogs.mo
34
%%NLS%%share/locale/tr/LC_MESSAGES/e2fsprogs.mo
35
%%NLS%%share/locale/vi/LC_MESSAGES/e2fsprogs.mo
35
%%NLS%%share/locale/vi/LC_MESSAGES/e2fsprogs.mo
36
%%NLS%%@unexec for i in cs de es fr it nl pl rw sv tr vi ; do rmdir -p %D/share/locale/$i/LC_MESSAGES 2>/dev/null || true ; done
36
%%NLS%%@unexec for i in cs de es fr it nl pl rw sv tr vi ; do rmdir -p %D/share/locale/$i/LC_MESSAGES 2>/dev/null || true ; done
37
@cwd /usr
38
sbin/e2fsck
39
sbin/fsck_ext2fs

Return to bug 116286