ports/178154: archivers/unalz: Fix build

KATO Tsuguru tkato432 at yahoo.com
Thu Apr 25 18:10:02 UTC 2013


>Number:         178154
>Category:       ports
>Synopsis:       archivers/unalz: 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:   Thu Apr 25 18:10:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p11 i386
>Organization:
>Environment:
>Description:
- Fix build

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/archivers/unalz/Makefile archivers/unalz/Makefile
--- /usr/ports/archivers/unalz/Makefile	2013-04-23 14:57:22.000000000 +0900
+++ archivers/unalz/Makefile	2013-04-26 00:00:00.000000000 +0900
@@ -4,8 +4,7 @@
 PORTNAME=	unalz
 PORTVERSION=	0.65
 CATEGORIES=	archivers
-MASTER_SITES=	http://www.kipple.pe.kr/win/unalz/ \
-		http://www.c-s.li/ports/
+MASTER_SITES=	http://www.kipple.pe.kr/win/unalz/
 EXTRACT_SUFX=	.tgz
 
 MAINTAINER=	ports at FreeBSD.org
@@ -13,24 +12,30 @@
 
 LICENSE_FILE=	${WRKSRC}/readme.txt
 
-BROKEN=		fails to build
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
+USE_DOS2UNIX=	yes
 USE_ICONV=	yes
-PLIST_FILES=	bin/unalz
-MAKEFILE=	Makefile.freebsd
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-WRKSRC=		${WRKDIR}/unalz
-
-pre-patch:
-	cd ${WRKSRC} && for f in `find . -name '*.c' -o -name '*.h'`; do \
-		${TR} -d '\015' < ${WRKSRC}/$$f > ${WRKSRC}/$$f.tmp && \
-		${MV} -f ${WRKSRC}/$$f.tmp ${WRKSRC}/$$f; \
-	done
-	${REINPLACE_CMD} -e 's|CPP = g++|CPP = ${CXX}|' \
-			-e "s|CC  =|CC  ?=|" \
-			${WRKSRC}/Makefile
+MAKE_ARGS=	CPP="${CXX}" CC="${CC}" OBJ="${UNALZ_OBJS}" \
+		LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}"
+ALL_TARGET=	posix-utf8
+MAKE_JOBS_SAFE=	yes
+
+CFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib -lz -lbz2
+
+PLIST_FILES=	bin/${PORTNAME}
+
+UNALZ_OBJS=	main.o UnAlz.o UnAlzUtils.o UnAlzBz2decompress.o \
+		UnAlzBzip2.o UnAlzbzlib.o
+
+post-patch:
+	@${REINPLACE_CMD} -e \
+		'/get_crc_table/s|unsigned long|Z_U4|' ${WRKSRC}/UnAlz.cpp
+	@${REINPLACE_CMD} -e \
+		'/<sys\/timeb.h>/d' ${WRKSRC}/main.cpp
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/unalz ${PREFIX}/bin
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} ${PREFIX}/bin)
 
 .include <bsd.port.mk>
diff -urN /usr/ports/archivers/unalz/distinfo archivers/unalz/distinfo
--- /usr/ports/archivers/unalz/distinfo	2012-11-08 04:19:40.000000000 +0900
+++ archivers/unalz/distinfo	2013-04-26 00:00:00.000000000 +0900
@@ -1,2 +1,3 @@
+MD5 (unalz-0.65.tgz) = e4db2c4e3c8f6f5ee414b68bc55288e5
 SHA256 (unalz-0.65.tgz) = 4c26699eb7545072de2ef7de79b4fff1f01c4db09cebff2d8d50ec03d5d74db0
 SIZE (unalz-0.65.tgz) = 137985
diff -urN /usr/ports/archivers/unalz/pkg-descr archivers/unalz/pkg-descr
--- /usr/ports/archivers/unalz/pkg-descr	2012-11-08 04:19:40.000000000 +0900
+++ archivers/unalz/pkg-descr	2013-04-26 00:00:00.000000000 +0900
@@ -1,4 +1,4 @@
-Unalz is a BSD-licensed unarchiver for AlZip format which requires proprietary
-and win32-only software but widely used in Korea.
+Unalz is a BSD-licensed unarchiver for AlZip format which requires
+proprietary and win32-only software but widely used in Korea.
 
 WWW: http://www.kipple.pe.kr/win/unalz/
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list