Bug 183838 - Fix sysutils/dvdisaster build with clang [PATCH]
Summary: Fix sysutils/dvdisaster build with clang [PATCH]
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: Rusmir Dusko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-10 09:20 UTC by Horia Racoviceanu
Modified: 2014-01-08 16:20 UTC (History)
0 users

See Also:


Attachments
file.diff (428 bytes, patch)
2013-11-10 09:20 UTC, Horia Racoviceanu
no flags Details | Diff
dvdisaster.diff (6.72 KB, patch)
2013-11-30 00:30 UTC, Horia Racoviceanu
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Horia Racoviceanu 2013-11-10 09:20:00 UTC
Fix build with a gcc-less world.

Fix: Despite the software insisting on gcc, it compiles
and is fully functional with the clang c compiler.

Build log:
https://redports.org/buildarchive/20131110064220-25444/

Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2013-11-10 09:20:07 UTC
Maintainer of sysutils/dvdisaster,

Please note that PR ports/183838 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/183838

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer 2013-11-10 09:20:08 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Corey Halpin 2013-11-16 01:52:26 UTC
  Approve.

~crh

On 2013-11-10, Edwin Groothuis wrote:
> Maintainer of sysutils/dvdisaster,
> 
> Please note that PR ports/183838 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/183838
> 
> -- 
> Edwin Groothuis via the GNATS Auto Assign Tool
> edwin@FreeBSD.org
> 
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2013-11-16 18:14:01 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 Horia Racoviceanu 2013-11-30 00:30:44 UTC
- Update to 0.72.5
- Remove LICENSE_FILE
- Remove PORTSCOUT
- USES gmake instead of USE_GMAKE
- Support STAGEDIR
- Add DOCS and NLS Option
- Fix build with Clang
- Change pkg-message

Build log:
https://redports.org/buildarchive/20131129222908-84632/

May I maintain this port?
Thanks
Comment 6 Corey Halpin 2013-11-30 15:48:25 UTC
  These look like excellent improvements, thank you.

  I would be glad pass maintainership of this port to someone who can devote 
more time to it.

~crh

On 2013-11-30, Horia Racoviceanu wrote:
> - Update to 0.72.5
> - Remove LICENSE_FILE
> - Remove PORTSCOUT
> - USES gmake instead of USE_GMAKE
> - Support STAGEDIR
> - Add DOCS and NLS Option
> - Fix build with Clang
> - Change pkg-message
> 
> Build log:
> https://redports.org/buildarchive/20131129222908-84632/
> 
> May I maintain this port?
> Thanks
Comment 7 Rusmir Dusko freebsd_committer 2014-01-08 00:21:56 UTC
Responsible Changed
From-To: freebsd-ports-bugs->nemysis

I'll take it.
Comment 8 dfilter service freebsd_committer 2014-01-08 16:13:13 UTC
Author: nemysis
Date: Wed Jan  8 16:13:03 2014
New Revision: 339154
URL: http://svnweb.freebsd.org/changeset/ports/339154

Log:
  - Update to 0.72.5 [1]
  - Pass maintainership to submitter
  - Remove LICENSE_FILE [1]
  - USES gmake instead of USE_GMAKE [1]
  - Change CONFIGURE_ARGS [1]
  - Remove PORTSCOUT [1]
  - Support STAGEDIR and add OPTIONS_SUB [1]
  - Add DOCS and NLS Option [1]
  - Use NLS_USES=gettext instead of USES=gettext [1]
  - Fix build with Clang [1]
  - Disable all warnings with -w
  - Add patch and REINPLACE_CMD, fix bad C++ code
  - Add patch-GNUmakefile.template, adjust install [1]
  - Change pkg-message [1]
  
  PR:		ports/183838 [1]
  Submitted by:	Horia Racoviceanu <horia@racoviceanu.com>
  Approved by:	maintainer (Corey Halpin <chalpin@cs.wisc.edu>)

Added:
  head/sysutils/dvdisaster/files/
  head/sysutils/dvdisaster/files/patch-GNUmakefile.template   (contents, props changed)
  head/sysutils/dvdisaster/files/patch-tools__memory.c   (contents, props changed)
Modified:
  head/sysutils/dvdisaster/Makefile
  head/sysutils/dvdisaster/distinfo   (contents, props changed)
  head/sysutils/dvdisaster/pkg-message   (contents, props changed)
  head/sysutils/dvdisaster/pkg-plist

Modified: head/sysutils/dvdisaster/Makefile
==============================================================================
--- head/sysutils/dvdisaster/Makefile	Wed Jan  8 16:12:38 2014	(r339153)
+++ head/sysutils/dvdisaster/Makefile	Wed Jan  8 16:13:03 2014	(r339154)
@@ -2,45 +2,51 @@
 # $FreeBSD$
 
 PORTNAME=	dvdisaster
-PORTVERSION=	0.72.4
-PORTREVISION=	1
+PORTVERSION=	0.72.5
 CATEGORIES=	sysutils
 MASTER_SITES=	http://dvdisaster.net/downloads/
 
-MAINTAINER=	chalpin@cs.wisc.edu
+MAINTAINER=	horia@racoviceanu.com
 COMMENT=	CD/DVD error recovery tool
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKSRC}/COPYING
 
 BUILD_DEPENDS=	bash:${PORTSDIR}/shells/bash
 
 MAKEFILE=	GNUmakefile
 
+USES=		gmake pkgconfig
 USE_BZIP2=	yes
-USES=		gettext pkgconfig
 USE_GNOME=	gtk20
+CONFIGURE_LOG=	configure.log
 CONFIGURE_ARGS=	--prefix=${PREFIX} \
 		--docsubdir="/" \
 		--png-includes=${LOCALBASE}/include \
-		--png-libraries=${LOCALBASE}/lib
-USE_GMAKE=	yes
-MAKE_JOBS_UNSAFE=yes
-
-.if defined(NOPORTDOCS)
-CONFIGURE_ARGS+=	--docdir=${WRKSRC}
-.else
-CONFIGURE_ARGS+=	--docdir=${DOCSDIR}
-.endif
+		--png-libraries=${LOCALBASE}/lib \
+		--phpmountdir=${LOCALBASE}/www/${PORTNAME} \
+		--mandir=${PREFIX}/man \
+		--localedir=${PREFIX}/share/locale \
+		--buildroot=${STAGEDIR}
+MAKE_JOBS_UNSAFE=	yes
 
 PORTDOCS=	*
 
-PORTSCOUT=	limitw:1,even
+OPTIONS_DEFINE=	DOCS NLS
+OPTIONS_SUB=	yes
 
-MAN1=		dvdisaster.1
-MANLANG=	"" cs de it
+DOCS_CONFIGURE_ON=	--docdir=${DOCSDIR}
+DOCS_CONFIGURE_OFF=	--docdir=${WRKSRC}
+
+NLS_USES=	gettext
+
+post-patch:
+	${REINPLACE_CMD} -e '/REQUIRE_GCC/d' \
+		${WRKSRC}/configure ${WRKSRC}/tools/configure
+	${REINPLACE_CMD} -e 's|$$(CFG_GTK2_CFLAGS)|$$(CFG_GTK2_CFLAGS) -w|' \
+		${WRKSRC}/GNUmakefile.template
+	${REINPLACE_CMD} -e 's|(ctx)|(*ctx)|' \
+		${WRKSRC}/md5.c
 
-NO_STAGE=	yes
 do-configure:
 	@(cd ${CONFIGURE_WRKSRC} && \
 		if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
@@ -50,12 +56,9 @@ do-configure:
 	    INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
 	    INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
 	    ${CONFIGURE_ENV} bash configure ${CONFIGURE_ARGS}; then \
-			 ${ECHO_CMD} "===>  Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
-			 (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
-			 ${FALSE}; \
+		 ${ECHO_CMD} "===>  Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \
+		 (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+		 ${FALSE}; \
 		fi)
 
-post-install:
-	@${CAT} ${PKGMESSAGE}
-
 .include <bsd.port.mk>

Modified: head/sysutils/dvdisaster/distinfo
==============================================================================
--- head/sysutils/dvdisaster/distinfo	Wed Jan  8 16:12:38 2014	(r339153)
+++ head/sysutils/dvdisaster/distinfo	Wed Jan  8 16:13:03 2014	(r339154)
@@ -1,2 +1,2 @@
-SHA256 (dvdisaster-0.72.4.tar.bz2) = 444763bc40bcc8c396ecd7af0d5d6dd8c458009d4ed62af74ef54074541aa05e
-SIZE (dvdisaster-0.72.4.tar.bz2) = 5097738
+SHA256 (dvdisaster-0.72.5.tar.bz2) = dd19e69d2ad361458cb5250d63ae6a483914f7fddeaa3593030e60ea65c4cfe0
+SIZE (dvdisaster-0.72.5.tar.bz2) = 5065440

Added: head/sysutils/dvdisaster/files/patch-GNUmakefile.template
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/dvdisaster/files/patch-GNUmakefile.template	Wed Jan  8 16:13:03 2014	(r339154)
@@ -0,0 +1,35 @@
+--- ./GNUmakefile.template.orig	2013-11-25 05:07:19.000000000 +0000
++++ ./GNUmakefile.template	2013-11-25 05:08:26.000000000 +0000
+@@ -356,19 +356,19 @@
+ 	    install -m 644 $$i/LC_MESSAGES/dvdisaster.mo $(BUILDROOT)$(LOCALEDIR)/$$i/LC_MESSAGES; \
+ 	  done \
+ 	fi
+-	@echo "# dvdisaster uninstaller script" > $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
+-	@echo "# Usage: sh dvdisaster-uninstall.sh" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
+-	@echo >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
+-	@echo "rm -f $(BINDIR)/dvdisaster $(BINDIR)/dvdisaster.exe $(BINDIR)/dvdisaster-win.exe $(BINDIR)/dvdisaster-uninstall.sh" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
+-	@echo "rm -rf $(DOCSUBDIR)" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
+-	@echo "rm -f $(MANDIR)/man1/dvdisaster.1" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
+-	@for i in $(PO_LOCALES); do \
+-	  echo "rm $(LOCALEDIR)/$$i/LC_MESSAGES/dvdisaster.mo" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh ; \
+-	done
+-	@for i in $(MAN_LOCALES); do \
+-	  echo "rm $(MANDIR)/$$i/man1/dvdisaster.1" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh ; \
+-	done
+-	@echo "echo \"dvdisaster has been uninstalled.\"" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
++#	@echo "# dvdisaster uninstaller script" > $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
++#	@echo "# Usage: sh dvdisaster-uninstall.sh" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
++#	@echo >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
++#	@echo "rm -f $(BINDIR)/dvdisaster $(BINDIR)/dvdisaster.exe $(BINDIR)/dvdisaster-win.exe $(BINDIR)/dvdisaster-uninstall.sh" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
++#	@echo "rm -rf $(DOCSUBDIR)" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
++#	@echo "rm -f $(MANDIR)/man1/dvdisaster.1" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
++#	@for i in $(PO_LOCALES); do \
++#	  echo "rm $(LOCALEDIR)/$$i/LC_MESSAGES/dvdisaster.mo" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh ; \
++#	done
++#	@for i in $(MAN_LOCALES); do \
++#	  echo "rm $(MANDIR)/$$i/man1/dvdisaster.1" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh ; \
++#	done
++#	@echo "echo \"dvdisaster has been uninstalled.\"" >> $(BUILDROOT)$(BINDIR)/dvdisaster-uninstall.sh
+ 	
+ uninstall:
+ 	@echo "Uninstalling package..."

Added: head/sysutils/dvdisaster/files/patch-tools__memory.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/dvdisaster/files/patch-tools__memory.c	Wed Jan  8 16:13:03 2014	(r339154)
@@ -0,0 +1,11 @@
+--- ./tools/memory.c.orig	2012-03-26 14:46:05.000000000 +0200
++++ ./tools/memory.c	2014-01-08 14:13:28.000000000 +0100
+@@ -165,7 +165,7 @@
+ static void print_ptrs(char *msg)
+ {  int bucket,i,n=0;
+ 
+-   fprintf(stdout, msg);
++   fprintf(stdout, "msg\n");
+ 
+    for(bucket=0; bucket<64; bucket++)
+       for(i=0; i<phCnt[bucket]; i++)

Modified: head/sysutils/dvdisaster/pkg-message
==============================================================================
--- head/sysutils/dvdisaster/pkg-message	Wed Jan  8 16:12:38 2014	(r339153)
+++ head/sysutils/dvdisaster/pkg-message	Wed Jan  8 16:13:03 2014	(r339154)
@@ -1,3 +1,9 @@
+===============================================================================
+
+dvdisaster has been installed.
+
 Note that dvdisaster tries to read /dev/pass* to list available CD/DVD drives,
 so the program will not detect any available drives if the user running
 dvdisaster does not have permissions to read /dev/pass*
+
+===============================================================================

Modified: head/sysutils/dvdisaster/pkg-plist
==============================================================================
--- head/sysutils/dvdisaster/pkg-plist	Wed Jan  8 16:12:38 2014	(r339153)
+++ head/sysutils/dvdisaster/pkg-plist	Wed Jan  8 16:13:03 2014	(r339154)
@@ -1,27 +1,11 @@
 bin/dvdisaster
-bin/dvdisaster-uninstall.sh
-locale/cs/LC_MESSAGES/dvdisaster.mo
-locale/de/LC_MESSAGES/dvdisaster.mo
-locale/it/LC_MESSAGES/dvdisaster.mo
-locale/ru/LC_MESSAGES/dvdisaster.mo
-locale/sv/LC_MESSAGES/dvdisaster.mo
-locale/pt_BR/LC_MESSAGES/dvdisaster.mo
-@dirrm locale/pt_BR/LC_MESSAGES
-@dirrm locale/pt_BR
-@dirrm locale/sv/LC_MESSAGES
-@dirrm locale/sv
-@dirrm locale/ru/LC_MESSAGES
-@dirrm locale/ru
-@dirrm locale/it/LC_MESSAGES
-@dirrm locale/it
-@dirrm locale/de/LC_MESSAGES
-@dirrm locale/de
-@dirrm locale/cs/LC_MESSAGES
-@dirrm locale/cs
-@dirrmtry locale
-@dirrmtry man/it/man1
-@dirrmtry man/it
-@dirrmtry man/de/man1
-@dirrmtry man/de
-@dirrmtry man/cs/man1
-@dirrmtry man/cs
+man/cs/man1/dvdisaster.1.gz
+man/de/man1/dvdisaster.1.gz
+man/it/man1/dvdisaster.1.gz
+man/man1/dvdisaster.1.gz
+%%NLS%%share/locale/cs/LC_MESSAGES/dvdisaster.mo
+%%NLS%%share/locale/de/LC_MESSAGES/dvdisaster.mo
+%%NLS%%share/locale/it/LC_MESSAGES/dvdisaster.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/dvdisaster.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/dvdisaster.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/dvdisaster.mo
_______________________________________________
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 9 Rusmir Dusko freebsd_committer 2014-01-08 16:13:16 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!