Bug 178154 - archivers/unalz: Fix build
Summary: archivers/unalz: Fix build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 19:10 UTC by tkato432
Modified: 2013-05-10 15:40 UTC (History)
0 users

See Also:


Attachments
file.diff (2.62 KB, patch)
2013-04-25 19:10 UTC, tkato432
no flags Details | Diff
archivers_unalz.diff (3.19 KB, patch)
2013-04-26 18:54 UTC, tkato432
no flags Details | Diff
archivers_unalz.diff (3.19 KB, patch)
2013-04-27 18:56 UTC, tkato432
no flags Details | Diff
archivers_unalz.diff (2.44 KB, patch)
2013-05-09 18:56 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-04-25 19:10:02 UTC
- Fix build
Comment 1 Edwin Groothuis freebsd_committer 2013-04-25 19:10:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Martin Wilke freebsd_committer 2013-04-26 10:01:24 UTC
State Changed
From-To: open->feedback

fails to build on 8 
http://miwibox.org/tb/index.php?action=describe_port&id=2337
Comment 3 tkato432 2013-04-26 18:54:45 UTC
Here is the corrected patch.
Comment 4 tkato432 2013-04-27 18:56:02 UTC
Remake of the patch against current tree.
Comment 5 tkato432 2013-05-09 18:56:54 UTC
Remake of the patch against current tree.
Comment 6 dfilter service freebsd_committer 2013-05-10 15:31:22 UTC
Author: miwi
Date: Fri May 10 14:31:14 2013
New Revision: 317806
URL: http://svnweb.freebsd.org/changeset/ports/317806

Log:
  - Fix build
  
  PR:		178154
  Submitted by:	Ports Fury

Added:
  head/archivers/unalz/files/
  head/archivers/unalz/files/patch-UnAlz.cpp   (contents, props changed)
Modified:
  head/archivers/unalz/Makefile
  head/archivers/unalz/pkg-descr   (contents, props changed)

Modified: head/archivers/unalz/Makefile
==============================================================================
--- head/archivers/unalz/Makefile	Fri May 10 14:29:29 2013	(r317805)
+++ head/archivers/unalz/Makefile	Fri May 10 14:31:14 2013	(r317806)
@@ -5,8 +5,7 @@ PORTNAME=	unalz
 PORTVERSION=	0.65
 PORTREVISION=	1
 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@FreeBSD.org
@@ -14,14 +13,28 @@ COMMENT=	Extracts AlZip archives
 
 LICENSE_FILE=	${WRKSRC}/readme.txt
 
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
 USES=		iconv
-PLIST_FILES=	bin/unalz
-MAKEFILE=	Makefile.freebsd
+USE_DOS2UNIX=	yes
+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
-WRKSRC=		${WRKDIR}/unalz
+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 \
+		'/<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>

Added: head/archivers/unalz/files/patch-UnAlz.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/archivers/unalz/files/patch-UnAlz.cpp	Fri May 10 14:31:14 2013	(r317806)
@@ -0,0 +1,14 @@
+--- UnAlz.cpp.orig
++++ UnAlz.cpp
+@@ -1907,7 +1907,11 @@
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ UINT32 CUnAlz::CRC32(UINT32 l, BYTE c)
+ {
++#ifndef Z_U4
+ 	const unsigned long *CRC_TABLE = get_crc_table();
++#else
++	const Z_U4 *CRC_TABLE = get_crc_table();
++#endif
+ 	return CRC_TABLE[(l ^ c) & 0xff] ^ (l >> 8);
+ }
+ 

Modified: head/archivers/unalz/pkg-descr
==============================================================================
--- head/archivers/unalz/pkg-descr	Fri May 10 14:29:29 2013	(r317805)
+++ head/archivers/unalz/pkg-descr	Fri May 10 14:31:14 2013	(r317806)
@@ -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/
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Martin Wilke freebsd_committer 2013-05-10 15:31:23 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!