diff options
author | Cédric Krier <cedk@gentoo.org> | 2006-12-07 21:09:24 +0000 |
---|---|---|
committer | Cédric Krier <cedk@gentoo.org> | 2006-12-07 21:09:24 +0000 |
commit | 48aba4948e975b66ceec4ea13f70b0148a1877fd (patch) | |
tree | 5ad1df880ad4bace48ac3616d3824ab843fa14af /x11-misc | |
parent | profiles/use.local.desc: add use flags for dmenu (diff) | |
download | sunrise-48aba4948e975b66ceec4ea13f70b0148a1877fd.tar.gz sunrise-48aba4948e975b66ceec4ea13f70b0148a1877fd.tar.bz2 sunrise-48aba4948e975b66ceec4ea13f70b0148a1877fd.zip |
x11-misc/dmenu: Add use flag savedconfig
svn path=/sunrise/; revision=2158
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/dmenu/ChangeLog | 3 | ||||
-rw-r--r-- | x11-misc/dmenu/Manifest | 16 | ||||
-rw-r--r-- | x11-misc/dmenu/dmenu-1.6.ebuild | 41 |
3 files changed, 50 insertions, 10 deletions
diff --git a/x11-misc/dmenu/ChangeLog b/x11-misc/dmenu/ChangeLog index 41d6f7807..e043c5b14 100644 --- a/x11-misc/dmenu/ChangeLog +++ b/x11-misc/dmenu/ChangeLog @@ -2,6 +2,9 @@ # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 07 Dec 2006; Cedric Krier <cedk@gentoo.org> dmenu-1.6.ebuild: + Add use flag savedconfig + 07 Dec 2006; Cedric Krier <cedk@gentoo.org> -dmenu-1.5.ebuild, +dmenu-1.6.ebuild: Version bump diff --git a/x11-misc/dmenu/Manifest b/x11-misc/dmenu/Manifest index e423fb4ef..464250a5b 100644 --- a/x11-misc/dmenu/Manifest +++ b/x11-misc/dmenu/Manifest @@ -1,12 +1,12 @@ DIST dmenu-1.6.tar.gz 7333 RMD160 f172744f07112e0c32e855294893a1d168d3c681 SHA1 724f6fc4907f012d2ce5ac6dba60875356bce05a SHA256 253ba1c782691c851bb44bb2a4f8d405e0ca443f87f75bd0ac9d836ddfc0ab22 -EBUILD dmenu-1.6.ebuild 833 RMD160 84a57e8ffa24170ff2a10d0bd5dd93ccd05de353 SHA1 bc4d5f435ca8e00933fe7682809c700ae2ffa2f3 SHA256 7fd78cc0ea44405c0084256b163d941089230c352bb4b68278c8d2fcd01096eb -MD5 b3a3b5d2783874ce6c2d81ba7a4a806a dmenu-1.6.ebuild 833 -RMD160 84a57e8ffa24170ff2a10d0bd5dd93ccd05de353 dmenu-1.6.ebuild 833 -SHA256 7fd78cc0ea44405c0084256b163d941089230c352bb4b68278c8d2fcd01096eb dmenu-1.6.ebuild 833 -MISC ChangeLog 3591 RMD160 60823ef30d537d02886bcfb3ff435c261abe2357 SHA1 d141dd7da2a3479a889f3b1106008f39b9670766 SHA256 b07ba12c0b10503710e53b9bc166056375ea61c082e1140a2bf16af4dc3fb154 -MD5 09d7671b1689e4bd58ae0aa156dcf3a4 ChangeLog 3591 -RMD160 60823ef30d537d02886bcfb3ff435c261abe2357 ChangeLog 3591 -SHA256 b07ba12c0b10503710e53b9bc166056375ea61c082e1140a2bf16af4dc3fb154 ChangeLog 3591 +EBUILD dmenu-1.6.ebuild 2037 RMD160 947aace61547949567d85cfd2a520e97d60e2b9f SHA1 1d337a3d6e2b7dfa33a199d09af13d09054a6630 SHA256 e6f104642858e2fc132060cff2b8fd8316a8d9c529acea2eab9d90c12c8ddc13 +MD5 893257494a29e942e459edf6011bbf59 dmenu-1.6.ebuild 2037 +RMD160 947aace61547949567d85cfd2a520e97d60e2b9f dmenu-1.6.ebuild 2037 +SHA256 e6f104642858e2fc132060cff2b8fd8316a8d9c529acea2eab9d90c12c8ddc13 dmenu-1.6.ebuild 2037 +MISC ChangeLog 3683 RMD160 bbda1298c0a4f15eb348d1b261160b66c782ec3b SHA1 82e296665477069f02461c3bc924f13d6669f63b SHA256 e60c239219c0d463f0e1339190961a0a23c5f204f2c0100c1813edae6a1aefd3 +MD5 029172a2c73e2dffb8e8fb5d7b0c2baf ChangeLog 3683 +RMD160 bbda1298c0a4f15eb348d1b261160b66c782ec3b ChangeLog 3683 +SHA256 e60c239219c0d463f0e1339190961a0a23c5f204f2c0100c1813edae6a1aefd3 ChangeLog 3683 MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 MD5 1e678929a9fec6632e227bdf2262e9a1 metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 metadata.xml 170 diff --git a/x11-misc/dmenu/dmenu-1.6.ebuild b/x11-misc/dmenu/dmenu-1.6.ebuild index a98346800..147beeeac 100644 --- a/x11-misc/dmenu/dmenu-1.6.ebuild +++ b/x11-misc/dmenu/dmenu-1.6.ebuild @@ -11,7 +11,7 @@ SRC_URI="http://suckless.org/download/${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~x86 ~amd64" -IUSE="" +IUSE="savedconfig" DEPEND="x11-libs/libX11" RDEPEND=${DEPEND} @@ -28,14 +28,51 @@ src_unpack() { -e "s/CFLAGS = -Os/CFLAGS +=/" \ -e "s/LDFLAGS =/LDFLAGS +=/" \ config.mk || die "sed failed" + + if use savedconfig; then + local conf root + for conf in ${PF} ${P} ${PN}; do + for root in "${PORTAGE_CONFIGROOT}" "${ROOT}" /; do + configfile=${root}etc/portage/savedconfig/${conf}.config.h + if [[ -r ${configfile} ]]; then + elog "Found your ${configfile} and using it." + cp -f ${configfile} "${S}"/${PN}.h + return 0 + fi + done + done + ewarn "Could not locate user configfile, so we will save a default one." + fi } src_compile() { - emake CC=$(tc-getCC) || die "emake failed" + local msg + use savedconfig && msg=", please check the configfile" + emake CC=$(tc-getCC) || die "emake failed${msg}" } src_install() { emake DESTDIR="${D}" PREFIX="/usr" install || die "emake install failed" + insinto /usr/share/${PN} + newins ${PN}.h ${PF}.config.h + dodoc README } + +pkg_preinst() { + mv "${D}"/usr/share/${PN}/${PF}.config.h "${T}"/ +} + +pkg_postinst() { + if use savedconfig; then + local config_dir="${PORTAGE_CONFIGROOT:-${ROOT}}/etc/portage/savedconfig" + elog "Saving this build config to ${config_dir}/${PF}.config.h" + einfo "Read this ebuild for more info on how to take advantage of this option." + mkdir -p "${config_dir}" + cp "${T}"/${PF}.config.h "${config_dir}"/${PF}.config.h + fi + einfo "This ebuild has support for user defined configs" + einfo "Please read this ebuild for more details and re-emerge as needed" + einfo "if you want to add or remove functionality for ${PN}" +} |