summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@gentoo.org>2019-07-05 20:09:21 -0400
committerCraig Andrews <candrews@gentoo.org>2019-07-05 20:40:55 -0400
commit34e563862212b0f4e26a451220355957f3cd6d74 (patch)
treee507570fd91c34d26bd92106eb1b199f24ed545a /dev-util/conf2struct
parentdev-perl/Conf-Libconfig: Perl extension for libconfig (diff)
downloadgentoo-34e563862212b0f4e26a451220355957f3cd6d74.tar.gz
gentoo-34e563862212b0f4e26a451220355957f3cd6d74.tar.bz2
gentoo-34e563862212b0f4e26a451220355957f3cd6d74.zip
dev-util/conf2struct: Create C parsers for libconfig and command-line
Package-Manager: Portage-2.3.68, Repoman-2.3.16 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'dev-util/conf2struct')
-rw-r--r--dev-util/conf2struct/Manifest1
-rw-r--r--dev-util/conf2struct/conf2struct-0_pre0.ebuild38
-rw-r--r--dev-util/conf2struct/conf2struct-9999.ebuild28
-rw-r--r--dev-util/conf2struct/files/conf2struct-0_pre0-cc-and-cflags.patch32
-rw-r--r--dev-util/conf2struct/files/conf2struct-0_pre0-dest-exists.patch21
-rw-r--r--dev-util/conf2struct/files/conf2struct-0_pre0-destdir.patch47
-rw-r--r--dev-util/conf2struct/files/conf2struct-0_pre0-install-and-uninstall.patch33
-rw-r--r--dev-util/conf2struct/files/conf2struct-0_pre0-install-not-run-all.patch22
-rw-r--r--dev-util/conf2struct/metadata.xml11
9 files changed, 233 insertions, 0 deletions
diff --git a/dev-util/conf2struct/Manifest b/dev-util/conf2struct/Manifest
new file mode 100644
index 000000000000..60764ee4874b
--- /dev/null
+++ b/dev-util/conf2struct/Manifest
@@ -0,0 +1 @@
+DIST conf2struct-0_pre0.tar.gz 50851 BLAKE2B 21db6cca56ba18a48c65395fbf3def5de6190515be46ca2e7113c17c9b874cdcc7fb72b06b586c57a1803e98b56df5decd10ea1dd6dcc4144a78d6a0ff6bf9dd SHA512 e0eb1d43ec1375e65796197c16246a2cc38e0a4d078c4028e8675cc1ff6ef08c7802ec18f57232d91f2d4133573129f7a2b05a9f1d8b74bbddd072550f846b1d
diff --git a/dev-util/conf2struct/conf2struct-0_pre0.ebuild b/dev-util/conf2struct/conf2struct-0_pre0.ebuild
new file mode 100644
index 000000000000..c027b8564d68
--- /dev/null
+++ b/dev-util/conf2struct/conf2struct-0_pre0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="Create C parsers for libconfig and command-line"
+HOMEPAGE="https://github.com/yrutschle/conf2struct/"
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/yrutschle/conf2struct.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64"
+ GIT_COMMIT="10ea3356b65e712fb000f4d37f00e1dc09c1e722"
+ SRC_URI="https://github.com/yrutschle/conf2struct/archive/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${PN}-${GIT_COMMIT}"
+fi
+
+PATCHES=(
+ "${FILESDIR}/${P}-install-and-uninstall.patch"
+ "${FILESDIR}/${P}-cc-and-cflags.patch"
+ "${FILESDIR}/${P}-destdir.patch"
+ "${FILESDIR}/${P}-install-not-run-all.patch"
+ "${FILESDIR}/${P}-dest-exists.patch"
+)
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps pcre systemd tcpd"
+
+RDEPEND="dev-libs/libconfig
+ dev-perl/Conf-Libconfig"
+DEPEND="${RDEPEND}"
+
+src_install(){
+ emake DESTDIR="${D}" prefix="${EPREFIX%/}/usr" install
+}
diff --git a/dev-util/conf2struct/conf2struct-9999.ebuild b/dev-util/conf2struct/conf2struct-9999.ebuild
new file mode 100644
index 000000000000..3ab3bce60c3a
--- /dev/null
+++ b/dev-util/conf2struct/conf2struct-9999.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="Create C parsers for libconfig and command-line"
+HOMEPAGE="https://github.com/yrutschle/conf2struct/"
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/yrutschle/conf2struct.git"
+ inherit git-r3
+else
+ KEYWORDS="~amd64"
+ SRC_URI="https://github.com/yrutschle/conf2struct/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps pcre systemd tcpd"
+
+RDEPEND="dev-libs/libconfig
+ dev-perl/Conf-Libconfig"
+DEPEND="${RDEPEND}"
+
+src_install(){
+ emake DESTDIR="${D}" prefix="${EPREFIX%/}/usr" install
+}
diff --git a/dev-util/conf2struct/files/conf2struct-0_pre0-cc-and-cflags.patch b/dev-util/conf2struct/files/conf2struct-0_pre0-cc-and-cflags.patch
new file mode 100644
index 000000000000..322e8724e6c4
--- /dev/null
+++ b/dev-util/conf2struct/files/conf2struct-0_pre0-cc-and-cflags.patch
@@ -0,0 +1,32 @@
+From 8c68116a9c2e086e83075f46a1b21de218c2dd2e Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 5 Jul 2019 15:31:59 -0400
+Subject: [PATCH] Add CC and use CFLAGS in Makefile
+
+CC is necessary to specify the compiler to use (default to gcc) and use CFLAGS to specify compiler arguments
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index bf9bae3..5b7212f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,7 +6,7 @@ all: example checker
+ CFLAGS=-g
+
+ checker: confcheck.o
+- gcc -o confcheck confcheck.o -lconfig
++ $(CC) $(CFLAGS) -o confcheck confcheck.o -lconfig
+
+
+ install: all
+@@ -18,7 +18,7 @@ uninstall:
+
+ EG_OBJ=example.o parser.o argtable3.o
+ example: $(EG_OBJ)
+- gcc -o example $(EG_OBJ) -lconfig
++ $(CC) $(CFLAGS) -o example $(EG_OBJ) -lconfig
+
+ example.c: eg_conf.cfg
+ ./conf2struct eg_conf.cfg
diff --git a/dev-util/conf2struct/files/conf2struct-0_pre0-dest-exists.patch b/dev-util/conf2struct/files/conf2struct-0_pre0-dest-exists.patch
new file mode 100644
index 000000000000..cb345f3588cc
--- /dev/null
+++ b/dev-util/conf2struct/files/conf2struct-0_pre0-dest-exists.patch
@@ -0,0 +1,21 @@
+From f4bc59c6cad87f6a237f92ea4c54e38705beeaac Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 5 Jul 2019 16:24:14 -0400
+Subject: [PATCH] In install, ensure destination exists
+
+---
+ Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile b/Makefile
+index bf9bae3..8bebca4 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,6 +10,7 @@ checker: confcheck.o
+
+
+ install:
++ mkdir -p $(DESTDIR)/$(bindir)
+ install -c conf2struct $(DESTDIR)$(bindir)/conf2struct
+ install -c confcheck $(DESTDIR)$(bindir)/confcheck
+
diff --git a/dev-util/conf2struct/files/conf2struct-0_pre0-destdir.patch b/dev-util/conf2struct/files/conf2struct-0_pre0-destdir.patch
new file mode 100644
index 000000000000..bae336e10854
--- /dev/null
+++ b/dev-util/conf2struct/files/conf2struct-0_pre0-destdir.patch
@@ -0,0 +1,47 @@
+From f3724170ae5b5e750ec5482241add97217047eb4 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 5 Jul 2019 15:33:49 -0400
+Subject: [PATCH 1/2] Use DESTDIR in install target
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index bf9bae3..fd2f21b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -10,8 +10,8 @@ checker: confcheck.o
+
+
+ install: all
+- install -c conf2struct $(bindir)/conf2struct
+- install -c confcheck $(bindir)/confcheck
++ install -c conf2struct $(DESTDIR)$(bindir)/conf2struct
++ install -c confcheck $(DESTDIR)$(bindir)/confcheck
+
+ uninstall:
+ rm -rf $(bindir)/conf2struct $(bindir)/confcheck
+
+From fa13135f93435de520480be9c1a578b20d538f55 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 5 Jul 2019 15:36:24 -0400
+Subject: [PATCH 2/2] Use DESTDIR in uninstall target
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index fd2f21b..ca1e673 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,7 +14,7 @@ install: all
+ install -c confcheck $(DESTDIR)$(bindir)/confcheck
+
+ uninstall:
+- rm -rf $(bindir)/conf2struct $(bindir)/confcheck
++ rm -rf $(DESTDIR)$(bindir)/conf2struct $(DESTDIR)$(bindir)/confcheck
+
+ EG_OBJ=example.o parser.o argtable3.o
+ example: $(EG_OBJ)
diff --git a/dev-util/conf2struct/files/conf2struct-0_pre0-install-and-uninstall.patch b/dev-util/conf2struct/files/conf2struct-0_pre0-install-and-uninstall.patch
new file mode 100644
index 000000000000..79269d628839
--- /dev/null
+++ b/dev-util/conf2struct/files/conf2struct-0_pre0-install-and-uninstall.patch
@@ -0,0 +1,33 @@
+From 9c0e889e29944428106c12ee28ce0074a29eae50 Mon Sep 17 00:00:00 2001
+From: Yves Rutschle <git1@rutschle.net>
+Date: Sat, 29 Jun 2019 18:41:20 +0200
+Subject: [PATCH] added install and uninstall targets to Makefile
+
+---
+ Makefile | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index b03aab3..bf9bae3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,3 +1,5 @@
++prefix=/usr/local
++bindir=$(prefix)/bin
+
+ all: example checker
+
+@@ -6,6 +8,13 @@ CFLAGS=-g
+ checker: confcheck.o
+ gcc -o confcheck confcheck.o -lconfig
+
++
++install: all
++ install -c conf2struct $(bindir)/conf2struct
++ install -c confcheck $(bindir)/confcheck
++
++uninstall:
++ rm -rf $(bindir)/conf2struct $(bindir)/confcheck
+
+ EG_OBJ=example.o parser.o argtable3.o
+ example: $(EG_OBJ)
diff --git a/dev-util/conf2struct/files/conf2struct-0_pre0-install-not-run-all.patch b/dev-util/conf2struct/files/conf2struct-0_pre0-install-not-run-all.patch
new file mode 100644
index 000000000000..5eca0a1de7b3
--- /dev/null
+++ b/dev-util/conf2struct/files/conf2struct-0_pre0-install-not-run-all.patch
@@ -0,0 +1,22 @@
+From b43351d0fdd687ed39b38531f673ba634aca5fee Mon Sep 17 00:00:00 2001
+From: Craig Andrews <candrews@integralblue.com>
+Date: Fri, 5 Jul 2019 16:22:49 -0400
+Subject: [PATCH] Install target should not run all
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index bf9bae3..8943248 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,7 +9,7 @@ checker: confcheck.o
+ $(CC) $(CFLAGS) -o confcheck confcheck.o -lconfig
+
+
+-install: all
++install:
+ install -c conf2struct $(DESTDIR)$(bindir)/conf2struct
+ install -c confcheck $(DESTDIR)$(bindir)/confcheck
+
diff --git a/dev-util/conf2struct/metadata.xml b/dev-util/conf2struct/metadata.xml
new file mode 100644
index 000000000000..e969234c463c
--- /dev/null
+++ b/dev-util/conf2struct/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>candrews@gentoo.org</email>
+ <name>Craig Andrews</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">yrutschle/conf2struct</remote-id>
+ </upstream>
+</pkgmetadata>