Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Destdirification, by Makoto Fujiwara via pkgsrc-wip.
- Loading branch information
wiz
committed
Jul 9, 2011
1 parent
c3bd5e5
commit 9e68eb3
Showing
6 changed files
with
307 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
$NetBSD: distinfo,v 1.1.1.1 2006/07/02 09:22:32 martti Exp $ | ||
$NetBSD: distinfo,v 1.2 2011/07/09 14:20:53 wiz Exp $ | ||
|
||
SHA1 (fvwm-themes-0.6.2.tar.bz2) = 63e2ed90bd172494611d3d37a418406c8e61bb27 | ||
RMD160 (fvwm-themes-0.6.2.tar.bz2) = 49706c0d2a367d2a2877ea5d1030397314ec211f | ||
Size (fvwm-themes-0.6.2.tar.bz2) = 592419 bytes | ||
SHA1 (fvwm-themes-extra-0.6.2.tar.bz2) = 3112f6ac44453f0fe1ec97553d6b167483f64012 | ||
RMD160 (fvwm-themes-extra-0.6.2.tar.bz2) = c78e47d355638760a990477c990e2f705dd347e7 | ||
Size (fvwm-themes-extra-0.6.2.tar.bz2) = 378884 bytes | ||
SHA1 (patch-Makefile.am) = 3ffd7c82bc3102abfcbe31d1050a12612ab39d21 | ||
SHA1 (patch-Makefile.in) = ac08d78e293916ef2289b1a266d279b9028d4fde | ||
SHA1 (patch-bin_Makefile.in) = 374482a3e72ebd312bbacd2e39e51e3460511c04 | ||
SHA1 (patch-bin_fvwm-themes-config-destdir.in) = 07913ca78721c6d3c53a7caad2e9834e6bd3cd05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
$NetBSD: patch-Makefile.am,v 1.1 2011/07/09 14:20:53 wiz Exp $ | ||
|
||
Use destdir fake version at install target: | ||
|
||
--- work/fvwm-themes-0.6.2/Makefile.am.orig 2002-12-06 02:01:37.000000000 +0000 | ||
+++ Makefile.am | ||
@@ -33,10 +33,10 @@ install-data-local: | ||
mv -f $(DESTDIR)$(SETTINGS_FILE).tmp $(DESTDIR)$(SETTINGS_FILE) | ||
|
||
PATH="$(DESTDIR)$(bindir):$(FVWM_BINDIR):$$PATH"; \ | ||
- $(DESTDIR)$(bindir)/fvwm-themes-config --site --reset | ||
+ $(DESTDIR)$(bindir)/fvwm-themes-config-destdir --site --reset | ||
|
||
if test "$(BUILD_MENUS)" = "yes"; then \ | ||
- $(DESTDIR)$(bindir)/fvwm-themes-menuapp --site --build-menus --remove-popup; \ | ||
+ $(DESTDIR)$(bindir)/fvwm-themes-menuapp-destdir --site --build-menus --remove-popup; \ | ||
fi | ||
|
||
if test "$(GNOME_ICONS)" = "yes"; then \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
$NetBSD: patch-Makefile.in,v 1.1 2011/07/09 14:20:53 wiz Exp $ | ||
|
||
Use destdir fake version at install target: | ||
|
||
--- work/fvwm-themes-0.6.2/Makefile.in.orig 2002-12-06 02:59:28.000000000 +0000 | ||
+++ ./Makefile.in | ||
@@ -372,10 +372,10 @@ install-data-local: | ||
mv -f $(DESTDIR)$(SETTINGS_FILE).tmp $(DESTDIR)$(SETTINGS_FILE) | ||
|
||
PATH="$(DESTDIR)$(bindir):$(FVWM_BINDIR):$$PATH"; \ | ||
- $(DESTDIR)$(bindir)/fvwm-themes-config --site --reset | ||
+ $(DESTDIR)$(bindir)/fvwm-themes-config-destdir --site --reset | ||
|
||
if test "$(BUILD_MENUS)" = "yes"; then \ | ||
- $(DESTDIR)$(bindir)/fvwm-themes-menuapp --site --build-menus --remove-popup; \ | ||
+ $(DESTDIR)$(bindir)/fvwm-themes-menuapp-destdir --site --build-menus --remove-popup; \ | ||
fi | ||
|
||
if test "$(GNOME_ICONS)" = "yes"; then \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
$NetBSD: patch-bin_Makefile.in,v 1.1 2011/07/09 14:20:53 wiz Exp $ | ||
|
||
(1) Delete harmful DESTDIR= (empty) | ||
(2) Add bin_SCRIPTS_DESTDIR variable for extra files faking for DESTDIR | ||
of two scripts. | ||
(3) Add targets to generate above two scripts | ||
|
||
--- work/fvwm-themes-0.6.2/bin/Makefile.in.orig 2002-12-06 02:59:29.000000000 +0000 | ||
+++ ./bin/Makefile.in | ||
@@ -32,8 +32,6 @@ mandir = @mandir@ | ||
includedir = @includedir@ | ||
oldincludedir = /usr/include | ||
|
||
-DESTDIR = | ||
- | ||
pkgdatadir = $(datadir)/@PACKAGE@ | ||
pkglibdir = $(libdir)/@PACKAGE@ | ||
pkgincludedir = $(includedir)/@PACKAGE@ | ||
@@ -97,6 +95,8 @@ bin_SCRIPTS = fvwm-themes-config fvwm-th | ||
fvwm-themes-menuapp fvwm-themes-com fvwm-themes-script \ | ||
fvwm-themes-images | ||
|
||
+bin_SCRIPTS_DESTDIR = fvwm-themes-config-destdir \ | ||
+ fvwm-themes-menuapp-destdir | ||
|
||
man_MANS = fvwm-themes-config.1 fvwm-themes-menuapp.1 fvwm-themes-com.1 \ | ||
fvwm-themes-images.1 fvwm-themes-start.1 | ||
@@ -104,12 +104,12 @@ man_MANS = fvwm-themes-config.1 fvwm-the | ||
|
||
EXTRA_DIST = $(man_MANS) | ||
|
||
-CLEANFILES = $(bin_SCRIPTS) | ||
+CLEANFILES = $(bin_SCRIPTS) $(bin_SCRIPTS_DESTDIR) | ||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs | ||
CONFIG_CLEAN_FILES = fvwm-themes-config fvwm-themes-start \ | ||
fvwm-themes-xrdb fvwm-themes-menuapp fvwm-themes-com fvwm-themes-script \ | ||
fvwm-themes-images | ||
-SCRIPTS = $(bin_SCRIPTS) | ||
+SCRIPTS = $(bin_SCRIPTS) $(bin_SCRIPTS_DESTDIR) | ||
|
||
man1dir = $(mandir)/man1 | ||
MANS = $(man_MANS) | ||
@@ -117,7 +117,7 @@ MANS = $(man_MANS) | ||
NROFF = nroff | ||
DIST_COMMON = Makefile.am Makefile.in fvwm-themes-com.in \ | ||
fvwm-themes-config.in fvwm-themes-images.in fvwm-themes-menuapp.in \ | ||
-fvwm-themes-script.in fvwm-themes-start.in fvwm-themes-xrdb.in | ||
+fvwm-themes-script.in fvwm-themes-start.in fvwm-themes-xrdb.in fvwm-themes-config-destdir.in | ||
|
||
|
||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) | ||
@@ -146,11 +146,15 @@ fvwm-themes-script: $(top_builddir)/conf | ||
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | ||
fvwm-themes-images: $(top_builddir)/config.status fvwm-themes-images.in | ||
cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | ||
+fvwm-themes-config-destdir: $(top_builddir)/config.status fvwm-themes-config-destdir.in | ||
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | ||
+fvwm-themes-menuapp-destdir: $(top_builddir)/config.status fvwm-themes-menuapp-destdir.in | ||
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | ||
|
||
-install-binSCRIPTS: $(bin_SCRIPTS) | ||
+install-binSCRIPTS: $(bin_SCRIPTS) $(bin_SCRIPTS_DESTDIR) | ||
@$(NORMAL_INSTALL) | ||
$(mkinstalldirs) $(DESTDIR)$(bindir) | ||
- @list='$(bin_SCRIPTS)'; for p in $$list; do \ | ||
+ @list='$(bin_SCRIPTS) $(bin_SCRIPTS_DESTDIR)'; for p in $$list; do \ | ||
if test -f $$p; then \ | ||
echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ | ||
$(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ | ||
@@ -162,7 +166,7 @@ install-binSCRIPTS: $(bin_SCRIPTS) | ||
|
||
uninstall-binSCRIPTS: | ||
@$(NORMAL_UNINSTALL) | ||
- list='$(bin_SCRIPTS)'; for p in $$list; do \ | ||
+ list='$(bin_SCRIPTS) $(bin_SCRIPTS_DESTDIR)'; for p in $$list; do \ | ||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ | ||
done | ||
|
115 changes: 115 additions & 0 deletions
115
wm/fvwm-themes/patches/patch-bin_fvwm-themes-config-destdir.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
$NetBSD: patch-bin_fvwm-themes-config-destdir.in,v 1.1 2011/07/09 14:20:53 wiz Exp $ | ||
|
||
(0) This file (fvwm-themes-config-destdir) is fake version of | ||
fvwm-themes-config. | ||
It is only for build time, and will be deleted before install. | ||
(1) Duplicates @searchPath to @searchPathD for DESTDIR version. | ||
It will be SUBST'ed by Makefile | ||
(2) s/^$ROOT_PREFIX//; tweak borrowed from another purpose of original scripts | ||
It also will be SUBST'ed. | ||
|
||
--- work/fvwm-themes-0.6.2/bin/fvwm-themes-config-destdir.in.orig 2011-07-02 00:38:28.000000000 +0000 | ||
+++ ./bin/fvwm-themes-config-destdir.in | ||
@@ -21,6 +21,7 @@ my $buildId = '@FT_BUILD_ID@'; | ||
|
||
my $scriptName = ($0 =~ m:([^/]+)$:, $1); | ||
my $scriptFile = "$bindir/$scriptName"; | ||
+ $scriptFile =~ s|-destdir||; | ||
my $rcFile = "themes-rc"; | ||
my $rcFile2 = "$rcFile-2"; | ||
# maybe we may use .$rcFile-3 | ||
@@ -28,6 +29,7 @@ my $rcFile3 = "$rcFile-3"; | ||
my $userHome = $ENV{'HOME'} || "./."; | ||
my $userDir = $ENV{'FVWM_USERDIR'} || "$userHome/.fvwm"; | ||
my @searchPath = ($userDir, $ftDataDir); | ||
+my @searchPathD = ($userDir, $ftDataDir); | ||
my ($workDir, $siteDir); | ||
my $themesSubDir = 'themes'; | ||
my $currentThemeName = 'current'; | ||
@@ -274,7 +276,7 @@ sub getExpandedRc ($) { | ||
my $file = shift; | ||
### should detect infinitive loops? | ||
if (!-f $file) { | ||
- foreach (@searchPath) { | ||
+ foreach (@searchPathD) { | ||
if (-f "$_/$file") { $file = "$_/$file"; last; } | ||
} | ||
} | ||
@@ -310,7 +312,7 @@ sub searchThemeCfgIncludeFile ($$) { | ||
unshift @subDirs, "."; | ||
} | ||
my $dir; | ||
- foreach $dir (@searchPath) { | ||
+ foreach $dir (@searchPathD) { | ||
foreach (@subDirs) { | ||
my $file = "$dir/$themesSubDir/$_/$file"; | ||
return $file if -f $file; | ||
@@ -655,7 +657,7 @@ sub parseComponentName ($) { | ||
sub getThemeDir ($) { | ||
my $theme = shift; | ||
my $dir; | ||
- foreach $dir (@searchPath) { | ||
+ foreach $dir (@searchPathD) { | ||
my $dir = "$dir/$themesSubDir/$theme"; | ||
return $dir if -d $dir; | ||
} | ||
@@ -712,7 +714,7 @@ sub getAllThemes (;$$) { | ||
my @dirList = (); | ||
push @dirList, $siteDir if $onlySite; | ||
push @dirList, $userDir if $onlyUser; | ||
- @dirList = @searchPath unless @dirList; | ||
+ @dirList = @searchPathD unless @dirList; | ||
my $themes = {}; | ||
my $dir; | ||
foreach $dir (@dirList) { | ||
@@ -1322,6 +1324,7 @@ sub getAllThemeSubMenusRc ($) { | ||
} @$components); | ||
|
||
my $readmeFile = getThemeDir($theme) . "/README"; | ||
+ $readmeFile =~ s/^$ROOT_PREFIX//; | ||
if (-r $readmeFile) { | ||
$menuRc .= qq(+ "" Nop\n); | ||
$menuRc .= qq(+ "README%menu/information.xpm%"\tFuncFvwmViewFile "$readmeFile"\n); | ||
@@ -2023,6 +2026,7 @@ sub getReadsRc($) { | ||
. $valueFile0; | ||
$optionFile =~ s/^$ROOT_PREFIX//; | ||
$valueFile =~ s/^$ROOT_PREFIX//; | ||
+ $valueFile0 =~ s/^$ROOT_PREFIX//; | ||
|
||
push @$optionExports, { | ||
'f' => $valueFile, 'c' => $current, 'v' => $valueFile0 | ||
@@ -2296,8 +2300,10 @@ Read @$rcFile2@ | ||
"\nFuncFvwmRestartFvwmTheme\n": ""; | ||
|
||
$contents = "# fvwm/$rcFile2 $version$header"; | ||
+ my $siteDirD = $siteDir; | ||
+ $siteDirD =~ s/^$ROOT_PREFIX//; | ||
$contents .= qq{ | ||
-SetEnv FT_DATADIR '$siteDir' | ||
+SetEnv FT_DATADIR '$siteDirD' | ||
ImagePath $imagePath | ||
$funcFvwmRestartFvwmTheme | ||
$menusAndHooksRc | ||
@@ -2307,7 +2313,7 @@ Mouse 2 A CM Menu MenuFvwmThemes | ||
|
||
$contents = "# fvwm/$rcFile3 $version$header"; | ||
$contents .= qq{ | ||
-SetEnv FT_DATADIR '$siteDir' | ||
+SetEnv FT_DATADIR '$siteDirD' | ||
ImagePath $imagePath | ||
|
||
$switchMenusAndHooksRc | ||
@@ -2399,10 +2405,9 @@ GetOptions( | ||
"no-cfg-cache" => \$noCfgCache, | ||
) || wrongUsage(); | ||
|
||
-shift @searchPath if $site; | ||
-$workDir = $searchPath[0]; | ||
-$siteDir = $searchPath[-1]; | ||
- | ||
+shift @searchPathD if $site; | ||
+$workDir = $searchPathD[0]; | ||
+$siteDir = $searchPathD[-1]; | ||
if ($install) { | ||
my $themesDir = "$workDir"; | ||
my $version = $version; |