Fix XaraLX, add debian-patches.sh
svn path=/nixpkgs/trunk/; revision=31358
This commit is contained in:
parent
5a4b9fc92b
commit
ac911fce68
32
maintainers/scripts/debian-patches.sh
Executable file
32
maintainers/scripts/debian-patches.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Download patches from debian project
|
||||
# Usage $0 debian-patches.txt debian-patches.nix
|
||||
# An example input and output files can be found in applications/graphics/xara/
|
||||
|
||||
DEB_URL=http://patch-tracker.debian.org/patch/series/dl
|
||||
declare -a deb_patches
|
||||
mapfile -t deb_patches < $1
|
||||
|
||||
prefix="${DEB_URL}/${deb_patches[0]}"
|
||||
|
||||
if [[ -n "$2" ]]; then
|
||||
exec 1> $2
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
# Generated by $(basename $0) from $(basename $1)
|
||||
let
|
||||
prefix = "${prefix}";
|
||||
in
|
||||
[
|
||||
EOF
|
||||
for ((i=1;i < ${#deb_patches[@]}; ++i)); do
|
||||
url="${prefix}/${deb_patches[$i]}"
|
||||
sha256=$(nix-prefetch-url $url)
|
||||
echo " {"
|
||||
echo " url = \"\${prefix}/${deb_patches[$i]}\";"
|
||||
echo " sha256 = \"$sha256\";"
|
||||
echo " }"
|
||||
done
|
||||
echo "]"
|
30
pkgs/applications/graphics/xara/debian-patches.nix
Normal file
30
pkgs/applications/graphics/xara/debian-patches.nix
Normal file
@ -0,0 +1,30 @@
|
||||
# Generated by debian-patches.sh from debian-patches.txt
|
||||
let
|
||||
prefix = "http://patch-tracker.debian.org/patch/series/dl/xaralx/0.7r1785-5";
|
||||
in
|
||||
[
|
||||
{
|
||||
url = "${prefix}/30_gtk_wxwidgets_symbol_clash";
|
||||
sha256 = "1rc9dh9mnp93mad96dkp7idyhhcw7h6w0g5s92mqgzj79hqgaziz";
|
||||
}
|
||||
{
|
||||
url = "${prefix}/40_algorithm_include";
|
||||
sha256 = "03jhl1qnxj7nl8malf6v1y24aldfz87x1p2jxp04mrr35nzvyyc0";
|
||||
}
|
||||
{
|
||||
url = "${prefix}/50_update_imagemagick_version_parser";
|
||||
sha256 = "1nilsqghlr649sc14n1aqkhdx7f66rq91gqccdpi17jwijs27497";
|
||||
}
|
||||
{
|
||||
url = "${prefix}/remove-icon-suffix";
|
||||
sha256 = "160zmkgwlsanqivnip89558yvd9zvqp8ks2wbyr2aigl2rafin22";
|
||||
}
|
||||
{
|
||||
url = "${prefix}/45_fix_gcc4";
|
||||
sha256 = "06zsj0z9v5n557gj8337v6xd26clbvm4dc0qhvpvzbisq81l9jyi";
|
||||
}
|
||||
{
|
||||
url = "${prefix}/55_fix_contstuctor_call";
|
||||
sha256 = "0b14glrcwhv0ja960h56n5jm4f9563ladap2pgaywihq485ql1c1";
|
||||
}
|
||||
]
|
7
pkgs/applications/graphics/xara/debian-patches.txt
Normal file
7
pkgs/applications/graphics/xara/debian-patches.txt
Normal file
@ -0,0 +1,7 @@
|
||||
xaralx/0.7r1785-5
|
||||
30_gtk_wxwidgets_symbol_clash
|
||||
40_algorithm_include
|
||||
50_update_imagemagick_version_parser
|
||||
remove-icon-suffix
|
||||
45_fix_gcc4
|
||||
55_fix_contstuctor_call
|
@ -1,35 +1,20 @@
|
||||
{stdenv, fetchurl, autoconf, automake, gettext, libtool, cvs, wxGTK, gtk,
|
||||
pkgconfig, libxml2, zip, libpng, libjpeg, shebangfix, perl, freetype}:
|
||||
{stdenv, fetchurl, automake, gettext, freetype, libxml2, pango, pkgconfig
|
||||
, wxGTK, gtk, perl, zip}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xaralx-0.7r1766";
|
||||
name = "xaralx-0.7r1785";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://downloads2.xara.com/opensource/XaraLX-0.7r1766.tar.bz2;
|
||||
sha256 = "1rcl7hqvcai586jky7hvzxhnq8q0ka2rsmgiq5ijwclgr5d4ah7n";
|
||||
url = http://downloads2.xara.com/opensource/XaraLX-0.7r1785.tar.bz2;
|
||||
sha256 = "05xbzq1i1vw2mdsv7zjqfpxfv3g1j0g5kks0gq6sh373xd6y8lyh";
|
||||
};
|
||||
|
||||
buildInputs = [automake autoconf gettext libtool cvs wxGTK gtk pkgconfig libxml2 zip libpng libjpeg shebangfix perl];
|
||||
buildNativeInputs = [ automake pkgconfig gettext perl zip ];
|
||||
buildInputs = [ wxGTK gtk libxml2 freetype pango ];
|
||||
|
||||
inherit freetype libpng libjpeg libxml2;
|
||||
configureFlags = "--with-wx-config --disable-svnversion --disable-international";
|
||||
configureFlags = "--disable-svnversion";
|
||||
|
||||
patches = [./gtk_cflags.patch];
|
||||
patches = map fetchurl (import ./debian-patches.nix);
|
||||
|
||||
# Why do I need to add library path for freetype ?
|
||||
installPhase = "
|
||||
make install
|
||||
ensureDir \$out/lib
|
||||
mv \$out/{bin,lib}/XaraLX
|
||||
cat >> \$out/bin/XaraLX << EOF
|
||||
#!/bin/sh
|
||||
LD_LIBRARY_PATH=\$freetype/lib:\$libpng/lib:\$libjpeg/lib:\$libxml2/lib:
|
||||
\$out/lib/XaraLX \"\\$@\"
|
||||
EOF
|
||||
chmod +x \$out/bin/XaraLX
|
||||
";
|
||||
|
||||
patchPhase = "
|
||||
find . -iname \"*.pl\" | xargs shebangfix;
|
||||
unset patchPhase; patchPhase
|
||||
";
|
||||
prePatch = "patchShebangs Scripts";
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
diff -rc XaraLX-0.7r1766/Makefile.in XaraLX-0.7r1766.new/Makefile.in
|
||||
*** XaraLX-0.7r1766/Makefile.in 2007-01-31 13:43:04.000000000 +0100
|
||||
--- XaraLX-0.7r1766.new/Makefile.in 2007-05-15 00:19:36.000000000 +0200
|
||||
***************
|
||||
*** 256,262 ****
|
||||
@DARWIN_LINK_TRUE@XaraLX_SOURCES = Kernel/*.o wxOil/*.o tools/*.o wxXtra/*.o
|
||||
@DARWIN_LINK_FALSE@XaraLX_LDSOURCE = -Wl,--start-group $(XaraLX_SOURCES) -Wl,--end-group
|
||||
@DARWIN_LINK_TRUE@XaraLX_LDSOURCE = $(XaraLX_SOURCES)
|
||||
! XaraLX_LDFLAGS = --debug -L$(srcdir)/$(CDRAW_LIB_DIR) $(WX_LIBS) $(LIBS) $(LIBXML2_LIBS) -lCDraw
|
||||
UNZIP = unzip
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
all: all-recursive
|
||||
--- 256,262 ----
|
||||
@DARWIN_LINK_TRUE@XaraLX_SOURCES = Kernel/*.o wxOil/*.o tools/*.o wxXtra/*.o
|
||||
@DARWIN_LINK_FALSE@XaraLX_LDSOURCE = -Wl,--start-group $(XaraLX_SOURCES) -Wl,--end-group
|
||||
@DARWIN_LINK_TRUE@XaraLX_LDSOURCE = $(XaraLX_SOURCES)
|
||||
! XaraLX_LDFLAGS = --debug -L$(srcdir)/$(CDRAW_LIB_DIR) $(GTK_LIBS) $(WX_LIBS) $(LIBS) $(LIBXML2_LIBS) -lCDraw
|
||||
UNZIP = unzip
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
all: all-recursive
|
@ -7631,9 +7631,7 @@ let
|
||||
inherit gsl aalib zlib libpng intltool gettext perl;
|
||||
};
|
||||
|
||||
xara = callPackage ../applications/graphics/xara {
|
||||
wxGTK = wxGTK26;
|
||||
};
|
||||
xara = callPackage ../applications/graphics/xara { };
|
||||
|
||||
xawtv = callPackage ../applications/video/xawtv { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user