aboutsummaryrefslogtreecommitdiff
Enables generating Lua's pkg-config file.

http://lua-users.org/lists/lua-l/2015-03/msg00338.html

--- a/Makefile	2014-10-30 00:14:41.000000000 +0100
+++ b/Makefile	2015-03-26 18:54:37.678374827 +0100
@@ -14,6 +14,7 @@
 INSTALL_BIN= $(INSTALL_TOP)/bin
 INSTALL_INC= $(INSTALL_TOP)/include
 INSTALL_LIB= $(INSTALL_TOP)/lib
+INSTALL_PC= $(INSTALL_LIB)/pkgconfig
 INSTALL_MAN= $(INSTALL_TOP)/man/man1
 INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
 INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
@@ -39,9 +40,12 @@
 PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris

 # What to install.
-TO_BIN= lua luac
+INTERPRETER= lua
+COMPILER= luac
+TO_BIN= $(INTERPRETER) $(COMPILER)
 TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
 TO_LIB= liblua.a
+TO_PC=  lua-$(V).pc
 TO_MAN= lua.1 luac.1

 # Lua version and release.
@@ -51,23 +55,29 @@
 # Targets start here.
 all:	$(PLAT)

-$(PLATS) clean:
+$(PLATS):
 	cd src && $(MAKE) $@

+clean:
+	cd src && $(MAKE) $@
+	$(RM) $(TO_PC)
+
 test:	dummy
 	src/lua -v

-install: dummy
-	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
+install: dummy $(TO_PC)
+	cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_PC) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
 	cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
 	cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
 	cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+	cd src && $(INSTALL_DATA) ../$(TO_PC) $(INSTALL_PC)
 	cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)

 uninstall:
 	cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
 	cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC)
 	cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB)
+	cd src && cd $(INSTALL_PC)  && $(RM) $(TO_PC)
 	cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN)

 local:
@@ -90,11 +100,13 @@
 	@echo "TO_BIN= $(TO_BIN)"
 	@echo "TO_INC= $(TO_INC)"
 	@echo "TO_LIB= $(TO_LIB)"
+	@echo "TO_PC= $(TO_PC)"
 	@echo "TO_MAN= $(TO_MAN)"
 	@echo "INSTALL_TOP= $(INSTALL_TOP)"
 	@echo "INSTALL_BIN= $(INSTALL_BIN)"
 	@echo "INSTALL_INC= $(INSTALL_INC)"
 	@echo "INSTALL_LIB= $(INSTALL_LIB)"
+	@echo "INSTALL_PC= $(INSTALL_PC)"
 	@echo "INSTALL_MAN= $(INSTALL_MAN)"
 	@echo "INSTALL_LMOD= $(INSTALL_LMOD)"
 	@echo "INSTALL_CMOD= $(INSTALL_CMOD)"
@@ -103,12 +115,28 @@

 # echo pkg-config data
 pc:
-	@echo "version=$R"
-	@echo "prefix=$(INSTALL_TOP)"
-	@echo "libdir=$(INSTALL_LIB)"
-	@echo "includedir=$(INSTALL_INC)"
+	@echo 'prefix=$(INSTALL_TOP)'
+	@echo 'libdir=$(INSTALL_LIB)'
+	@echo 'includedir=$(INSTALL_INC)'
+	@echo 'bindir=$(INSTALL_BIN)'
+	@echo
+	@echo 'INSTALL_LMOD=$(INSTALL_LMOD)'
+	@echo 'INSTALL_CMOD=$(INSTALL_CMOD)'
+	@echo 'INTERPRETER=$${bindir}/$(INTERPRETER)'
+	@echo 'COMPILER=$${bindir}/$(COMPILER)'
+	@echo
+	@echo 'Name: Lua'
+	@echo 'Description: A powerful, fast, lightweight, embeddable scripting language'
+	@echo 'Version: $(R)'
+	@echo
+	@echo 'Libs: -L$${libdir} -llua -lm'
+	@echo 'Cflags: -I$${includedir}'
+
+pkg-config: $(TO_PC)
+$(TO_PC):
+	@$(MAKE) -s pc > $@

 # list targets that do not create files (but not all makes understand .PHONY)
-.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho
+.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho pkg-config

 # (end of Makefile)
-server-starman, perl-test-www-mechanize, perl-test-www-mechanize-catalyst)[native-inputs]: Likewise. * gnu/packages/xorg.scm (perl-x11-xcb)[native-inputs]: Likewise.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/databases.scm7
-rw-r--r--gnu/packages/web.scm40
-rw-r--r--gnu/packages/xorg.scm1
3 files changed, 39 insertions, 9 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 6b8695ff04..648ba81aaf 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -861,6 +861,7 @@ extremely small.")
(native-inputs
`(("perl-dbd-sqlite" ,perl-dbd-sqlite)
("perl-file-temp" ,perl-file-temp)
+ ("perl-module-install" ,perl-module-install)
("perl-package-stash" ,perl-package-stash)
("perl-test-deep" ,perl-test-deep)
("perl-test-exception" ,perl-test-exception)
@@ -914,7 +915,8 @@ single query, \"JOIN\", \"LEFT JOIN\", \"COUNT\", \"DISTINCT\", \"GROUP BY\",
(build-system perl-build-system)
(native-inputs
`(("perl-cache-cache" ,perl-cache-cache)
- ("perl-dbd-sqlite" ,perl-dbd-sqlite)))
+ ("perl-dbd-sqlite" ,perl-dbd-sqlite)
+ ("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-carp-clan" ,perl-carp-clan)
("perl-dbix-class" ,perl-dbix-class)))
@@ -937,6 +939,8 @@ built-in caching support.")
(base32
"1w47rh2241iy5x3a9bqsyd5kdp9sk43dksr99frzv4qn4jsazfn6"))))
(build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-dbix-class" ,perl-dbix-class)))
(home-page "http://search.cpan.org/dist/DBIx-Class-IntrospectableM2M")
@@ -967,6 +971,7 @@ introspected and examined.")
("perl-config-general" ,perl-config-general)
("perl-dbd-sqlite" ,perl-dbd-sqlite)
("perl-dbix-class-introspectablem2m" ,perl-dbix-class-introspectablem2m)
+ ("perl-module-install" ,perl-module-install)
("perl-moose" ,perl-moose)
("perl-moosex-markasmethods" ,perl-moosex-markasmethods)
("perl-moosex-nonmoose" ,perl-moosex-nonmoose)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 623dad3995..ccba7ce7e6 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1054,7 +1054,8 @@ to perl-code, for faster generation of access_log lines.")
"0j1rrld13cjk7ks92b5hv3xw4rfm2lvmksb4rlzd8mx0a0wj0rc5"))))
(build-system perl-build-system)
(native-inputs
- `(("perl-http-request-ascgi" ,perl-http-request-ascgi)))
+ `(("perl-http-request-ascgi" ,perl-http-request-ascgi)
+ ("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-data-visitor" ,perl-data-visitor)
@@ -1078,7 +1079,8 @@ action, which will forward to the first available view.")
"1mpa64p61f3dp24xnhdraswch4sqj5vyv1iivcvvh5h0xi0haiy0"))))
(build-system perl-build-system)
(native-inputs
- `(("perl-test-requires" ,perl-test-requires)))
+ `(("perl-test-requires" ,perl-test-requires)
+ ("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-class-inspector" ,perl-class-inspector)
@@ -1120,6 +1122,7 @@ regular method.")
("perl-catalyst-plugin-session-state-cookie"
,perl-catalyst-plugin-session-state-cookie)
("perl-dbd-sqlite" ,perl-dbd-sqlite)
+ ("perl-module-install" ,perl-module-install)
("perl-test-www-mechanize-catalyst" ,perl-test-www-mechanize-catalyst)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
@@ -1149,6 +1152,8 @@ DBIx::Class.")
(base32
"0wfj4vnn2cvk6jh62amwlg050p37fcwdgrn9amcz24z6w4qgjqvz"))))
(build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-moose" ,perl-moose)))
@@ -1247,6 +1252,7 @@ when the dispatch type is first seen in your application.")
(build-system perl-build-system)
(native-inputs
`(("perl-dbd-sqlite" ,perl-dbd-sqlite)
+ ("perl-module-install" ,perl-module-install)
("perl-test-exception" ,perl-test-exception)
("perl-test-requires" ,perl-test-requires)))
(propagated-inputs
@@ -1315,6 +1321,8 @@ for you. It will work even with Catalyst debug logging turned off.")
(base32
"0v6hb4r1wv3djrnqvnjcn3xx1scgqzx8nyjdg9lfc1ybvamrl0rn"))))
(build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-plugin-session" ,perl-catalyst-plugin-session)
("perl-catalyst-runtime" ,perl-catalyst-runtime)
@@ -1350,7 +1358,8 @@ system authorises them to do).")
"0l83lkwmq0lngwh8b1rv3r719pn8w1gdbyhjqm74rnd0wbjl8h7f"))))
(build-system perl-build-system)
(native-inputs
- `(("perl-test-exception" ,perl-test-exception)))
+ `(("perl-module-install" ,perl-module-install)
+ ("perl-test-exception" ,perl-test-exception)))
(propagated-inputs
`(("perl-catalyst-plugin-authentication"
,perl-catalyst-plugin-authentication)
@@ -1403,7 +1412,8 @@ Catalyst.")
"19j7p4v7mbx6wrmpvmrnd974apx7hdl2s095ga3b9zcbdrl77h5q"))))
(build-system perl-build-system)
(native-inputs
- `(("perl-path-class" ,perl-path-class)))
+ `(("perl-path-class" ,perl-path-class)
+ ("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-config-any" ,perl-config-any)
@@ -1430,7 +1440,8 @@ formats.")
"171vi9xcl775scjaw4fcfdmqvz0rb1nr0xxg2gb3ng6bjzpslhgv"))))
(build-system perl-build-system)
(native-inputs
- `(("perl-test-deep" ,perl-test-deep)
+ `(("perl-module-install" ,perl-module-install)
+ ("perl-test-deep" ,perl-test-deep)
("perl-test-exception" ,perl-test-exception)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
@@ -1461,6 +1472,8 @@ management in web applications together: the state, and the store.")
(base32
"1rvxbfnpf9x2pc2zgpazlcgdlr2dijmxgmcs0m5nazs0w6xikssb"))))
(build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-plugin-session" ,perl-catalyst-plugin-session)
("perl-catalyst-runtime" ,perl-catalyst-runtime)
@@ -1519,6 +1532,8 @@ memory interprocess cache. It is based on Cache::FastMmap.")
(base32
"1b2ksz74cpigxqzf63rddar3vfmnbpwpdcbs11v0ml89pb8ar79j"))))
(build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-devel-stacktrace" ,perl-devel-stacktrace)
@@ -1544,6 +1559,8 @@ number, file name, and code context surrounding the line number.")
(base32
"1h8f12bhzh0ssq9gs8r9g3hqn8zn2k0q944vc1vm8j81bns16msy"))))
(build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-mime-types" ,perl-mime-types)
@@ -1644,7 +1661,8 @@ run an application on the web, either by doing them itself, or by letting you
(native-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-catalystx-roleapplicator" ,perl-catalystx-roleapplicator)
- ("perl-http-message" ,perl-http-message)))
+ ("perl-http-message" ,perl-http-message)
+ ("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-moose" ,perl-moose)
("perl-namespace-autoclean" ,perl-namespace-autoclean)
@@ -1673,6 +1691,7 @@ replaced with the contents of the X-Request-Base header.")
(build-system perl-build-system)
(native-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
+ ("perl-module-install" ,perl-module-install)
("perl-test-simple" ,perl-test-simple)
("perl-test-www-mechanize-catalyst" ,perl-test-www-mechanize-catalyst)
("perl-text-csv" ,perl-text-csv)
@@ -1698,7 +1717,8 @@ table based report in a variety of formats (CSV, HTML, etc.).")
"0x943j1n2r0zqanyzdrs1xsnn8ayn2wqskn7h144xcqa6v6gcisl"))))
(build-system perl-build-system)
(native-inputs
- `(("perl-yaml" ,perl-yaml)))
+ `(("perl-module-install" ,perl-module-install)
+ ("perl-yaml" ,perl-yaml)))
(inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-json-maybexs" ,perl-json-maybexs)
@@ -1807,7 +1827,8 @@ application classes.")
"0h02mpkc4cmi3jpvcd7iw7xyzx55bqvvl1qkf967gqkvpklm0qx5"))))
(build-system perl-build-system)
(native-inputs
- `(("perl-test-www-mechanize-catalyst" ,perl-test-www-mechanize-catalyst)))
+ `(("perl-module-install" ,perl-module-install)
+ ("perl-test-www-mechanize-catalyst" ,perl-test-www-mechanize-catalyst)))
(propagated-inputs
`(("perl-catalyst-runtime" ,perl-catalyst-runtime)
("perl-moose" ,perl-moose)
@@ -3045,6 +3066,8 @@ either mocked HTTP or a locally spawned server.")
(build-system perl-build-system)
(native-inputs
`(("perl-test-exception" ,perl-test-exception)))
+ (native-inputs
+ `(("perl-module-install" ,perl-module-install)))
(propagated-inputs
`(("perl-carp-assert-more" ,perl-carp-assert-more)
("perl-html-form" ,perl-html-form)
@@ -3077,6 +3100,7 @@ WWW::Mechanize that incorporates features for web application testing.")
`(("perl-catalyst-plugin-session" ,perl-catalyst-plugin-session)
("perl-catalyst-plugin-session-state-cookie"
,perl-catalyst-plugin-session-state-cookie)
+ ("perl-module-install" ,perl-module-install)
("perl-test-exception" ,perl-test-exception)
("perl-test-pod" ,perl-test-pod)
("perl-test-utf8" ,perl-test-utf8)))
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index af217ef679..1c458831da 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5780,6 +5780,7 @@ programs that cannot use the window system directly.")
(native-inputs
`(("perl-extutils-depends" ,perl-extutils-depends)
("perl-extutils-pkgconfig" ,perl-extutils-pkgconfig)
+ ("perl-module-install" ,perl-module-install)
("perl-test-deep" ,perl-test-deep)
("perl-test-exception" ,perl-test-exception)))
(propagated-inputs