ports/185708: japanese/ebview: Fix build with clang
KATO Tsuguru
tkato432 at yahoo.com
Sun Jan 12 18:40:08 UTC 2014
>Number: 185708
>Category: ports
>Synopsis: japanese/ebview: Fix build with clang
>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: Sun Jan 12 18:40:07 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: KATO Tsuguru
>Release: FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang
- Add LICENSE
New file:
files/patch-data__Makefile.in
files/patch-help__Makefile.in
files/patch-po__Makefile.in.in
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/japanese/ebview/Makefile japanese/ebview/Makefile
--- /usr/ports/japanese/ebview/Makefile 2013-11-06 21:58:38.000000000 +0900
+++ japanese/ebview/Makefile 2014-01-13 00:00:00.000000000 +0900
@@ -9,12 +9,16 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Electronic Book Viewer
-LIB_DEPENDS= eb:${PORTSDIR}/japanese/eb
+LICENSE= GPLv2 # (or later)
-CONFLICTS= ja-ebview-gtk2-*
+LIB_DEPENDS= libeb.so:${PORTSDIR}/japanese/eb
+OPTIONS_DEFINE= DOCS
+
+CONFLICTS= ja-ebview-gtk2-[0-9]*
+
+USES= gettext gmake
USE_GNOME= imlib
-USE_GMAKE= yes
USE_AUTOTOOLS= autoconf
MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
AUTOHEADER="${TRUE}"
@@ -22,21 +26,16 @@
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-pre-build:
-.for file in src/dictheading.c
- cd ${WRKSRC} && ${MV} ${file} ${file}.pre_iconv \
- && iconv -c -t ascii ${file}.pre_iconv > ${file} || ${TRUE}
-.endfor
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|// .*||' ${WRKSRC}/src/dictheading.c
post-install:
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ChangeLog README
- ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+ (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR})
.endfor
-.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -urN /usr/ports/japanese/ebview/files/patch-data__Makefile.in japanese/ebview/files/patch-data__Makefile.in
--- /usr/ports/japanese/ebview/files/patch-data__Makefile.in 1970-01-01 09:00:00.000000000 +0900
+++ japanese/ebview/files/patch-data__Makefile.in 2014-01-13 00:00:00.000000000 +0900
@@ -0,0 +1,19 @@
+--- data/Makefile.in.orig
++++ data/Makefile.in
+@@ -46,13 +46,13 @@
+
+ install:
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(packagedatadir); \
++ $(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(packagedatadir); \
++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(packagedatadir); \
+ fi; \
+ data="$(data)"; \
+ for file in $$data; do \
+- $(INSTALL_DATA) $(srcdir)/$$file $(packagedatadir)/$$file; \
++ $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(packagedatadir)/$$file; \
+ done; \
+
+ # Define this as empty until I found a useful application.
diff -urN /usr/ports/japanese/ebview/files/patch-help__Makefile.in japanese/ebview/files/patch-help__Makefile.in
--- /usr/ports/japanese/ebview/files/patch-help__Makefile.in 1970-01-01 09:00:00.000000000 +0900
+++ japanese/ebview/files/patch-help__Makefile.in 2014-01-13 00:00:00.000000000 +0900
@@ -0,0 +1,21 @@
+--- help/Makefile.in.orig
++++ help/Makefile.in
+@@ -49,15 +49,15 @@
+ dir="$(dir)"; \
+ for lang in $$dir; do \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(packagedatadir)/help/$$lang; \
++ $(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir)/help/$$lang; \
+ else \
+- $(top_srcdir)/mkinstalldirs $(packagedatadir)/help/$$lang; \
++ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(packagedatadir)/help/$$lang; \
+ fi; \
+ done; \
+ data="$(data)"; \
+ for lang in $$dir; do \
+ for file in $$data; do \
+- $(INSTALL_DATA) $(srcdir)/$$lang/$$file $(packagedatadir)/help/$$lang/$$file; \
++ $(INSTALL_DATA) $(srcdir)/$$lang/$$file $(DESTDIR)$(packagedatadir)/help/$$lang/$$file; \
+ done; \
+ done; \
+
diff -urN /usr/ports/japanese/ebview/files/patch-po__Makefile.in.in japanese/ebview/files/patch-po__Makefile.in.in
--- /usr/ports/japanese/ebview/files/patch-po__Makefile.in.in 1970-01-01 09:00:00.000000000 +0900
+++ japanese/ebview/files/patch-po__Makefile.in.in 2014-01-13 00:00:00.000000000 +0900
@@ -0,0 +1,52 @@
+--- po/Makefile.in.in.orig
++++ po/Makefile.in.in
+@@ -111,9 +111,9 @@
+ install-data-no: all
+ install-data-yes: all
+ if test -r "$(MKINSTALLDIRS)"; then \
+- $(MKINSTALLDIRS) $(datadir); \
++ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ else \
+- $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
++ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+@@ -125,27 +125,27 @@
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r "$(MKINSTALLDIRS)"; then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) $(DESTDIR)$$dir; \
+ else \
+- $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
++ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
++ echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ $(INSTALL_DATA) $$cat.m $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ echo "installing $$cat.m as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list