Bug 128877 - [PATCH] graphics/optipng: update to 0.6.2, take maintainership
Summary: [PATCH] graphics/optipng: update to 0.6.2, take maintainership
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: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-14 19:40 UTC by Thomas Hurst
Modified: 2009-01-19 20:50 UTC (History)
0 users

See Also:


Attachments
optipng-0.6.2.patch (7.90 KB, patch)
2008-11-14 19:40 UTC, Thomas Hurst
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hurst 2008-11-14 19:40:02 UTC
- Update to 0.6.2
- Add support for using the bundled patched zlib and libpng, both off by default.
- Update my email address.

Added file(s):
- files/patch-configure
- files/patch-lib-libpng-scripts-makefile.std
- files/patch-lib-zlib-Makefile.in
- files/patch-src-scripts-unix.mak.in

Removed file(s):
- files/patch-src__scripts__unix-secure.mak

Port maintainer (freaky@aagh.net) is cc'd.

Generated with FreeBSD Port Tools 0.77
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-11-14 19:40:16 UTC
Class Changed
From-To: maintainer-update->change-request

Fix category (submitter is not maintainer) (via the GNATS Auto Assign 
Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2008-11-14 19:40:18 UTC
Maintainer of graphics/optipng,

Please note that PR ports/128877 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/128877

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2008-11-14 19:40:22 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2008-11-14 19:51:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

I'll take it.
Comment 5 Thomas Hurst 2008-11-16 23:04:51 UTC
I approve, submitter is the maintainer.  I forgot to fix the subject,
and I guess using from: this email would have been good, meh.

-- 
Thomas 'Freaky' Hurst
    http://hur.st/
Comment 6 Eygene Ryabinkin 2008-11-22 21:02:48 UTC
Good day.

I happened to make the same update to 0.6.2 (had found that PR already
exists only after I finished my work), but I did it in a slightly
different way: it involves less patch files.  May be my work will be
useful:
--- 0001-Update-graphics-optipng-to-the-latest-version-0.6.2.patch begins here ---
From cf234c0e04727d4ecea3fbe06b214ee312645157 Mon Sep 17 00:00:00 2001
From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Date: Sat, 22 Nov 2008 23:15:07 +0300
Subject: [PATCH] Update graphics/optipng to the latest version, 0.6.2, and fix CVE-2008-5101

There is already ports/128877 that updates the port to 0.6.2, but this
patch is smaller, because instead of patching Makefiles it extensively
manipulates make's command-line options.

See: http://optipng.sourceforge.net/
See: http://secunia.com/advisories/32651

Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
---
 graphics/optipng/Makefile                          |   50 ++++++++++++++-----
 graphics/optipng/distinfo                          |    6 +-
 .../optipng/files/patch-lib::zlib::Makefile.in     |   11 ++++
 .../files/patch-src__scripts__unix-secure.mak      |   34 -------------
 graphics/optipng/pkg-descr                         |    2 +-
 5 files changed, 52 insertions(+), 51 deletions(-)
 create mode 100644 graphics/optipng/files/patch-lib::zlib::Makefile.in
 delete mode 100644 graphics/optipng/files/patch-src__scripts__unix-secure.mak

diff --git a/graphics/optipng/Makefile b/graphics/optipng/Makefile
index 0bfae22..16668c9 100644
--- a/graphics/optipng/Makefile
+++ b/graphics/optipng/Makefile
@@ -6,26 +6,50 @@
 #
 
 PORTNAME=	optipng
-PORTVERSION=	0.5.4
+PORTVERSION=	0.6.2
 CATEGORIES=	graphics
 MASTER_SITES=	SF
 
-MAINTAINER=	freaky@aagh.net
+MAINTAINER=	tom@hur.st
 COMMENT=	An optimizer for PNG files
 
-LIB_DEPENDS=	png.5:${PORTSDIR}/graphics/png
+OPTIONS=	BUNDLED_LIBPNG  "Use bundled libpng"    off \
+		BUNDLED_ZLIB    "Use bundled zlib"      off
+
+.include <bsd.port.pre.mk>
+
+HAS_CONFIGURE=	yes
+CONFIGURE_ARGS=
+MAKE_ARGS=	prefix="" \
+		DESTDIR="${PREFIX}" \
+		CC="${CC}" \
+		AR="${AR}" \
+		AR_RC="${AR} rc" \
+		ARFLAGS="rc" \
+		RANLIB="${RANLIB}" \
+		TAR="${TAR}" \
+		MKDIR_P="${MKDIR}" \
+		LN="${LN}" \
+		LN_SF="${LN} -sf" \
+		RM="${RM}" \
+		RM_F="${RM} -f"
+
+.ifndef WITH_BUNDLED_LIBPNG
+CONFIGURE_ARGS+=	-with-system-libpng
+LIB_DEPENDS+=	png.5:${PORTSDIR}/graphics/png
+MAKE_ARGS+=	CFLAGS="-O -I${LOCALBASE}/include" \
+		LDFLAGS="-s -L${LOCALBASE}/lib"
+.endif
+
+.ifndef WITH_BUNDLED_ZLIB
+CONFIGURE_ARGS=	-with-system-zlib
+.endif
 
-BUILD_WRKSRC=	${WRKSRC}/src
-MAKEFILE=	scripts/unix-secure.mak
-ALL_TARGET=	${PORTNAME}
 PLIST_FILES=	bin/optipng
 MAN1=		optipng.1
-PORTDOCS=	CAVEAT.txt HISTORY.txt TODO.txt USAGE.txt \
-		design.html features.html guide.html thanks.html
-
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/optipng ${PREFIX}/bin/
-	${INSTALL_MAN} ${WRKSRC}/man/optipng.1 ${MAN1PREFIX}/man/man1/
+PORTDOCS=	caveat.txt history.txt \
+		manual.html manual.pdf manual.txt \
+		png_optimization_guide.html thanks.html todo.txt
 
 post-install:
 .ifndef NOPORTDOCS
@@ -33,4 +57,4 @@ post-install:
 	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}/
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/graphics/optipng/distinfo b/graphics/optipng/distinfo
index 855d4a3..8fae05c 100644
--- a/graphics/optipng/distinfo
+++ b/graphics/optipng/distinfo
@@ -1,3 +1,3 @@
-MD5 (optipng-0.5.4.tar.gz) = 8d989971e674a06b55e17fc5b70c41aa
-SHA256 (optipng-0.5.4.tar.gz) = 3074f7ebac74683c12b805d58f836400cbec51355fad13f47d46775792ad35ab
-SIZE (optipng-0.5.4.tar.gz) = 1094572
+MD5 (optipng-0.6.2.tar.gz) = 08b6195bb5895a7fe167fab16dcdf6d5
+SHA256 (optipng-0.6.2.tar.gz) = 84312506ea0c683a4e7675b3c8278067222762520016cc61e53c2b0e679120ca
+SIZE (optipng-0.6.2.tar.gz) = 1052509
diff --git a/graphics/optipng/files/patch-lib::zlib::Makefile.in b/graphics/optipng/files/patch-lib::zlib::Makefile.in
new file mode 100644
index 0000000..d5c3527
--- /dev/null
+++ b/graphics/optipng/files/patch-lib::zlib::Makefile.in
@@ -0,0 +1,11 @@
+--- lib/zlib/Makefile.in.orig	2008-11-22 23:45:08.000000000 +0300
++++ lib/zlib/Makefile.in	2008-11-22 23:46:12.000000000 +0300
+@@ -68,7 +68,7 @@
+ 	fi
+ 
+ libz.a: $(OBJS) $(OBJA)
+-	$(AR) $@ $(OBJS) $(OBJA)
++	$(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
+ 	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
+ 
+ match.o: match.S
diff --git a/graphics/optipng/files/patch-src__scripts__unix-secure.mak b/graphics/optipng/files/patch-src__scripts__unix-secure.mak
deleted file mode 100644
index ba0debf..0000000
--- a/graphics/optipng/files/patch-src__scripts__unix-secure.mak
+++ /dev/null
@@ -1,34 +0,0 @@
---- ./src/scripts/unix-secure.mak.orig	Fri Aug 11 19:08:00 2006
-+++ ./src/scripts/unix-secure.mak	Sat Aug 12 10:56:39 2006
-@@ -12,17 +12,14 @@
- # Usage: make -f scripts/unix-secure.mak
- 
- 
--prefix=/usr/local
-+prefix=${PREFIX}
- exec_prefix=${prefix}
- bindir=${exec_prefix}/bin
--mandir=${prefix}/man
--man1dir=${mandir}/man1
-+man1dir=${MAN1PREFIX}/man/man1
- 
--CC = cc
--LD = $(CC)
--MAKE = make
--CFLAGS  = -O
--LDFLAGS = -s
-+CFLAGS  ?= -O
-+LDFLAGS += -s -L${LOCALBASE}/lib
-+CFLAGS  += -I${LOCALBASE}/include
- 
- OPTIPNG  = optipng
- PNGXLIB  = pngxtern.a
-@@ -35,7 +32,7 @@
- 
- 
- $(OPTIPNG): $(OBJS) $(LIBS)
--	$(LD) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS) -lpng -lz
-+	$(CC) -o $(OPTIPNG) $(LDFLAGS) $(OBJS) $(LIBS) -lpng -lz
- 
- 
- .c.o:
diff --git a/graphics/optipng/pkg-descr b/graphics/optipng/pkg-descr
index 4b91f9a..e544300 100644
--- a/graphics/optipng/pkg-descr
+++ b/graphics/optipng/pkg-descr
@@ -11,4 +11,4 @@ trial, and a wider search space.
 WWW: http://optipng.sourceforge.net/
 
 - Thomas Hurst
- <freaky@aagh.net>
+ <tom@hur.st>
-- 
1.6.0.4

--- 0001-Update-graphics-optipng-to-the-latest-version-0.6.2.patch ends here ---
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual   
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook 
    {_.-``-'         {_/            #
Comment 7 Thomas Hurst 2008-12-04 14:17:40 UTC
* Eygene Ryabinkin (rea-fbsd@codelabs.ru) wrote:

> Good day.
> 
> I happened to make the same update to 0.6.2 (had found that PR already
> exists only after I finished my work), but I did it in a slightly
> different way: it involves less patch files.  May be my work will be
> useful:


This looks good, but it doesn't appear to respect BUNDLED_{LIBPNG,ZLIB};
the bundled ones get built and linked unconditionally.

I should get a chance to look at it properly over the weekend unless you
have any insights.

-- 
Thomas 'Freaky' Hurst
    http://hur.st/
Comment 8 Martin Wilke freebsd_committer freebsd_triage 2009-01-12 15:44:43 UTC
State Changed
From-To: feedback->open

.
Comment 9 Martin Wilke freebsd_committer freebsd_triage 2009-01-12 15:44:57 UTC
State Changed
From-To: open->feedback

any news here?.
Comment 10 Martin Wilke freebsd_committer freebsd_triage 2009-01-19 19:14:21 UTC
Responsible Changed
From-To: miwi->wxs

you need also this one for the cve
Comment 11 dfilter service freebsd_committer freebsd_triage 2009-01-19 20:44:34 UTC
wxs         2009-01-19 20:44:24 UTC

  FreeBSD ports repository

  Modified files:
    graphics/optipng     Makefile distinfo pkg-descr 
  Added files:
    graphics/optipng/files patch-configure 
                           patch-lib-libpng-scripts-makefile.std 
                           patch-lib-zlib-Makefile.in 
                           patch-src-scripts-unix.mak.in 
  Log:
  - Update to 0.6.2
  - Add OPTIONS for bundled libpng and zlib (both off by default)
  - Update maintainer address
  
  PR:             ports/128877
  Submitted by:   Thomas Hurst <tom@hur.st> (maintainer)
  Security:       http://www.vuxml.org/freebsd/2bc960c4-e665-11dd-afcd-00e0815b8da8.html
  
  Revision  Changes    Path
  1.5       +23 -7     ports/graphics/optipng/Makefile
  1.7       +3 -3      ports/graphics/optipng/distinfo
  1.1       +11 -0     ports/graphics/optipng/files/patch-configure (new)
  1.1       +25 -0     ports/graphics/optipng/files/patch-lib-libpng-scripts-makefile.std (new)
  1.1       +37 -0     ports/graphics/optipng/files/patch-lib-zlib-Makefile.in (new)
  1.1       +33 -0     ports/graphics/optipng/files/patch-src-scripts-unix.mak.in (new)
  1.3       +1 -1      ports/graphics/optipng/pkg-descr
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 12 Wesley Shields freebsd_committer freebsd_triage 2009-01-19 20:47:11 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!