pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

luakit-git: Handle more gracefully DESTDIR



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu Sep 27 19:37:38 2018 +0200
Changeset:	09976453ec37a377e7198699aac5642afb60c861

Modified Files:
	luakit-git/Makefile
	luakit-git/distinfo
Added Files:
	luakit-git/patches/patch-Makefile
	luakit-git/patches/patch-config.mk

Log Message:
luakit-git: Handle more gracefully DESTDIR

DESTDIR was hardcoded accidently in buildopts.h, avoid that.

XXX: This should be double-checked and shared with upstream.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=09976453ec37a377e7198699aac5642afb60c861

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 luakit-git/Makefile                | 10 ++---
 luakit-git/distinfo                |  2 +
 luakit-git/patches/patch-Makefile  | 82 ++++++++++++++++++++++++++++++++++++++
 luakit-git/patches/patch-config.mk | 23 +++++++++++
 4 files changed, 112 insertions(+), 5 deletions(-)

diffs:
diff --git a/luakit-git/Makefile b/luakit-git/Makefile
index fdb1c0c8ed..a20ddecab4 100644
--- a/luakit-git/Makefile
+++ b/luakit-git/Makefile
@@ -17,11 +17,11 @@ GIT_REPO.luakit=	git://github.com/luakit/luakit
 WRKSRC=			${WRKDIR}/luakit
 
 LUAKIT_MAKE_FLAGS+=	DEVELOPMENT_PATHS=0
-LUAKIT_MAKE_FLAGS+=	APPDIR=${DESTDIR}${PREFIX}/share/applications
-LUAKIT_MAKE_FLAGS+=	DOCDIR=${DESTDIR}${PREFIX}/share/doc/luakit
-LUAKIT_MAKE_FLAGS+=	MANPREFIX=${DESTDIR}${PREFIX}/${PKGMANDIR}
-LUAKIT_MAKE_FLAGS+=	PIXMAPDIR=${DESTDIR}${PREFIX}/share/pixmaps
-LUAKIT_MAKE_FLAGS+=	XDGPREFIX=${DESTDIR}${PREFIX}/etc/xdg
+LUAKIT_MAKE_FLAGS+=	APPDIR=${PREFIX}/share/applications
+LUAKIT_MAKE_FLAGS+=	DOCDIR=${PREFIX}/share/doc/luakit
+LUAKIT_MAKE_FLAGS+=	MANPREFIX=${PREFIX}/${PKGMANDIR}
+LUAKIT_MAKE_FLAGS+=	PIXMAPDIR=${PREFIX}/share/pixmaps
+LUAKIT_MAKE_FLAGS+=	XDGPREFIX=${PREFIX}/etc/xdg
 LUAKIT_MAKE_FLAGS+=	USE_LUAJIT=0
 BUILD_MAKE_FLAGS+=	${LUAKIT_MAKE_FLAGS}
 INSTALL_MAKE_FLAGS+=	${LUAKIT_MAKE_FLAGS}
diff --git a/luakit-git/distinfo b/luakit-git/distinfo
index 61de44e352..a1d52983d6 100644
--- a/luakit-git/distinfo
+++ b/luakit-git/distinfo
@@ -4,7 +4,9 @@ SHA1 (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903
 RMD160 (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903c3947779f8c4d4.zip) = c829f11889a2e50e8a91b5c9553e84c0ded5fdd9
 SHA512 (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903c3947779f8c4d4.zip) = f493fde91e87b8bd40f3a90b558c4d297ed31bc00e6924660a5c1fa55aa35bfd2eb7c8a6a7ea1d6b9ef7d095d358659d350ca92fbc6f654a9df9a1544ce30fdf
 Size (luakit/2aecefe95c99808121edbf3903c3947779f8c4d4-2aecefe95c99808121edbf3903c3947779f8c4d4.zip) = 518360 bytes
+SHA1 (patch-Makefile) = 4a105f1201931904b432b9773c923274e0052d02
 SHA1 (patch-clib_xdg.c) = 503119fe2bba62a94b77575e3994db6329f19af3
 SHA1 (patch-common_luautil.c) = 73877098fe704e0f4a67c1eb273a777762d6c58d
+SHA1 (patch-config.mk) = e1c390151c004b2b806b2b53f9e1ce517d9b5d64
 SHA1 (patch-lib_window.lua) = 1282ea06f7c1a45b3465a3452b84b1483a694130
 SHA1 (patch-luah.c) = f811e2ddd3178007c62aba805110ba59934a3c3d
diff --git a/luakit-git/patches/patch-Makefile b/luakit-git/patches/patch-Makefile
new file mode 100644
index 0000000000..30e008cb0c
--- /dev/null
+++ b/luakit-git/patches/patch-Makefile
@@ -0,0 +1,82 @@
+$NetBSD$
+
+Improve DESTDIR support and use it only in install and deinstall target.
+The various paths are used in buildopts.h and there having the
+DESTDIR is not desiderable.
+
+--- Makefile.orig	2018-09-22 23:42:41.000000000 +0000
++++ Makefile
+@@ -27,7 +27,6 @@ options:
+ 	@echo "CFLAGS       = $(CFLAGS)"
+ 	@echo "CPPFLAGS     = $(CPPFLAGS)"
+ 	@echo "LDFLAGS      = $(LDFLAGS)"
+-	@echo "INSTALLDIR   = $(INSTALLDIR)"
+ 	@echo "MANPREFIX    = $(MANPREFIX)"
+ 	@echo "DOCDIR       = $(DOCDIR)"
+ 	@echo "XDGPREFIX    = $(XDGPREFIX)"
+@@ -94,37 +93,37 @@ clean:
+ 	rm -rf doc/apidocs doc/html luakit $(OBJS) $(EXT_OBJS) $(TSRC) $(THEAD) buildopts.h luakit.1 luakit.1.gz luakit.so
+ 
+ install: all
+-	install -d $(INSTALLDIR)/share/luakit/
+-	install -d $(DOCDIR) $(DOCDIR)/classes $(DOCDIR)/modules $(DOCDIR)/pages
+-	install -m644 README.md AUTHORS COPYING.GPLv3 $(DOCDIR)
+-	install -m644 doc/apidocs/classes/* $(DOCDIR)/classes
+-	install -m644 doc/apidocs/modules/* $(DOCDIR)/modules
+-	install -m644 doc/apidocs/pages/* $(DOCDIR)/pages
+-	install -m644 doc/apidocs/*.html $(DOCDIR)
+-	install -d $(INSTALLDIR)/share/luakit/lib $(INSTALLDIR)/share/luakit/lib/lousy $(INSTALLDIR)/share/luakit/lib/lousy/widget
+-	install -m644 lib/*.* $(INSTALLDIR)/share/luakit/lib
+-	install -m644 lib/lousy/*.* $(INSTALLDIR)/share/luakit/lib/lousy
+-	install -m644 lib/lousy/widget/*.* $(INSTALLDIR)/share/luakit/lib/lousy/widget
+-	install -d $(INSTALLDIR)/lib/luakit
+-	install -m644 luakit.so $(INSTALLDIR)/lib/luakit/luakit.so
+-	install -d $(INSTALLDIR)/bin
+-	install luakit $(INSTALLDIR)/bin/luakit
+-	install -d $(XDGPREFIX)/luakit/
+-	install -m644 config/*.lua $(XDGPREFIX)/luakit/
+-	install -d $(PIXMAPDIR)
+-	install -m644 extras/luakit.png $(PIXMAPDIR)
+-	install -d $(APPDIR)
+-	install -m644 extras/luakit.desktop $(APPDIR)
+-	install -d $(MANPREFIX)/man1/
+-	install -m644 luakit.1.gz $(MANPREFIX)/man1/
++	install -d $(DESTDIR)$(PREFIX)/share/luakit/
++	install -d $(DESTDIR)$(DOCDIR) $(DESTDIR)$(DOCDIR)/classes $(DESTDIR)$(DOCDIR)/modules $(DESTDIR)$(DOCDIR)/pages
++	install -m644 README.md AUTHORS COPYING.GPLv3 $(DESTDIR)$(DOCDIR)
++	install -m644 doc/apidocs/classes/* $(DESTDIR)$(DOCDIR)/classes
++	install -m644 doc/apidocs/modules/* $(DESTDIR)$(DOCDIR)/modules
++	install -m644 doc/apidocs/pages/* $(DESTDIR)$(DOCDIR)/pages
++	install -m644 doc/apidocs/*.html $(DESTDIR)$(DOCDIR)
++	install -d $(DESTDIR)$(PREFIX)/share/luakit/lib $(DESTDIR)$(PREFIX)/share/luakit/lib/lousy $(DESTDIR)$(PREFIX)/share/luakit/lib/lousy/widget
++	install -m644 lib/*.* $(DESTDIR)$(PREFIX)/share/luakit/lib
++	install -m644 lib/lousy/*.* $(DESTDIR)$(PREFIX)/share/luakit/lib/lousy
++	install -m644 lib/lousy/widget/*.* $(DESTDIR)$(PREFIX)/share/luakit/lib/lousy/widget
++	install -d $(DESTDIR)$(PREFIX)/lib/luakit
++	install -m644 luakit.so $(DESTDIR)$(PREFIX)/lib/luakit/luakit.so
++	install -d $(DESTDIR)$(PREFIX)/bin
++	install luakit $(DESTDIR)$(PREFIX)/bin/luakit
++	install -d $(DESTDIR)$(XDGPREFIX)/luakit/
++	install -m644 config/*.lua $(DESTDIR)$(XDGPREFIX)/luakit/
++	install -d $(DESTDIR)$(PIXMAPDIR)
++	install -m644 extras/luakit.png $(DESTDIR)$(PIXMAPDIR)
++	install -d $(DESTDIR)$(APPDIR)
++	install -m644 extras/luakit.desktop $(DESTDIR)$(APPDIR)
++	install -d $(DESTDIR)$(MANPREFIX)/man1/
++	install -m644 luakit.1.gz $(DESTDIR)$(MANPREFIX)/man1/
+ 	mkdir -p resources
+-	find resources -type d -exec install -d $(INSTALLDIR)/share/luakit/'{}' \;
+-	find resources -type f -exec sh -c 'f="{}"; install -m644 "$$f" "$(INSTALLDIR)/share/luakit/$$(dirname $$f)"' \;
++	find resources -type d -exec install -d $(DESTDIR)$(PREFIX)/share/luakit/'{}' \;
++	find resources -type f -exec sh -c 'f="{}"; install -m644 "$$f" "$(DESTDIR)$(PREFIX)/share/luakit/$$(dirname $$f)"' \;
+ 
+ uninstall:
+-	rm -rf $(INSTALLDIR)/bin/luakit $(INSTALLDIR)/share/luakit $(INSTALLDIR)/lib/luakit
+-	rm -rf $(MANPREFIX)/man1/luakit.1.gz $(XDGPREFIX)/luakit
+-	rm -rf $(APPDIR)/luakit.desktop $(PIXMAPDIR)/luakit.png
++	rm -rf $(DESTDIR)$(PREFIX)/bin/luakit $(DESTDIR)$(PREFIX)/share/luakit $(DESTDIR)$(PREFIX)/lib/luakit
++	rm -rf $(DESTDIR)$(MANPREFIX)/man1/luakit.1.gz $(DESTDIR)$(XDGPREFIX)/luakit
++	rm -rf $(DESTDIR)$(APPDIR)/luakit.desktop $(DESTDIR)$(PIXMAPDIR)/luakit.png
+ 
+ tests/util.so: tests/util.c Makefile
+ 	$(CC) -fpic $(CFLAGS) $(CPPFLAGS) -shared $< $(LDFLAGS) -o $@
diff --git a/luakit-git/patches/patch-config.mk b/luakit-git/patches/patch-config.mk
new file mode 100644
index 0000000000..5d46b95d14
--- /dev/null
+++ b/luakit-git/patches/patch-config.mk
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Improve DESTDIR support and use it only in install and deinstall target.
+The various paths are used in buildopts.h and there having the
+DESTDIR is not desiderable.
+
+--- config.mk.orig	2018-09-22 23:42:41.000000000 +0000
++++ config.mk
+@@ -25,14 +25,6 @@ PIXMAPDIR  ?= $(PREFIX)/share/pixmaps
+ APPDIR     ?= $(PREFIX)/share/applications
+ LIBDIR     ?= $(PREFIX)/lib/luakit
+ 
+-INSTALLDIR := $(DESTDIR)$(PREFIX)
+-MANPREFIX  := $(DESTDIR)$(MANPREFIX)
+-DOCDIR     := $(DESTDIR)$(DOCDIR)
+-XDGPREFIX  := $(DESTDIR)$(XDGPREFIX)
+-PIXMAPDIR  := $(DESTDIR)$(PIXMAPDIR)
+-APPDIR     := $(DESTDIR)$(APPDIR)
+-LIBDIR     := $(DESTDIR)$(LIBDIR)
+-
+ # Should luakit be built to load relative config paths (./lib ./config) ?
+ # (Useful when running luakit from it's source directory, disable otherwise).
+ ifneq ($(DEVELOPMENT_PATHS),0)


Home | Main Index | Thread Index | Old Index