uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchurl, gnome_python, librsvg, libwnck2, libgtop, pkg-config, python2, gtk2 }:
let
inherit (python2.pkgs) python pygtk;
in stdenv.mkDerivation rec {
ver_maj = "2.32";
ver_min = "0";
version = "${ver_maj}.${ver_min}";
pname = "gnome-python-desktop";
src = fetchurl {
url = "mirror://gnome/sources/gnome-python-desktop/${ver_maj}/gnome-python-desktop-${version}.tar.bz2";
sha256 = "1s8f9rns9v7qlwjv9qh9lr8crp88dpzfm45hj47zc3ivpy0dbnq9";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 librsvg libwnck2 libgtop python ];
propagatedBuildInputs = [ gnome_python pygtk ];
# gnome-python-desktop expects that .pth file is already installed by PyGTK
# in the same directory. This is not the case for Nix.
postInstall = ''
echo "gtk-2.0" > $out/${python2.sitePackages}/${pname}-${version}.pth
'';
meta = with lib; {
homepage = "http://www.pygtk.org";
description = "Python bindings for GNOME desktop packages";
license = licenses.lgpl21;
maintainers = [ maintainers.goibhniu ];
};
}

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchurl, python2, pkg-config, libgnome, GConf, glib, gtk2, gnome_vfs }:
with lib;
let
inherit (python2.pkgs) python pygobject2 pygtk dbus-python;
in stdenv.mkDerivation rec {
pname = "gnome-python";
version = "2.28.1";
src = fetchurl {
url = "mirror://gnome/sources/gnome-python/${lib.versions.majorMinor version}/gnome-python-${version}.tar.bz2";
sha256 = "759ce9344cbf89cf7f8449d945822a0c9f317a494f56787782a901e4119b96d8";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ python glib gtk2 GConf libgnome gnome_vfs ];
propagatedBuildInputs = [ pygobject2 pygtk dbus-python ];
# gnome-python expects that .pth file is already installed by PyGTK in the
# same directory. This is not the case for Nix.
postInstall = ''
echo "gtk-2.0" > $out/${python2.sitePackages}/gnome-python-${version}.pth
'';
meta = with lib; {
homepage = "http://pygtk.org/";
description = "Python wrapper for GNOME libraries";
platforms = platforms.linux;
license = licenses.lgpl2;
maintainers = with maintainers; [ qknight ];
};
}

View file

@ -0,0 +1,89 @@
{ config, stdenv, pkgs, lib }:
lib.makeScope pkgs.newScope (self: with self; {
#### PLATFORM
libIDL = callPackage ./platform/libIDL {
gettext = if stdenv.isDarwin then pkgs.gettext else null;
};
ORBit2 = callPackage ./platform/ORBit2 { };
libart_lgpl = callPackage ./platform/libart_lgpl { };
libglade = callPackage ./platform/libglade { };
libgnomeprint = callPackage ./platform/libgnomeprint { };
libgnomeprintui = callPackage ./platform/libgnomeprintui { };
libgnomecups = callPackage ./platform/libgnomecups { };
libgtkhtml = callPackage ./platform/libgtkhtml { };
GConf = callPackage ./platform/GConf { };
libgnomecanvas = callPackage ./platform/libgnomecanvas { };
libgnomecanvasmm = callPackage ./platform/libgnomecanvasmm { };
# for git-head builds
gnome-common = callPackage platform/gnome-common { };
gnome_mime_data = callPackage ./platform/gnome-mime-data { };
gnome_python = callPackage ./bindings/gnome-python { };
gnome_python_desktop = callPackage ./bindings/gnome-python-desktop { };
gnome_vfs = callPackage ./platform/gnome-vfs { };
libgnome = callPackage ./platform/libgnome { };
libgnomeui = callPackage ./platform/libgnomeui { };
libbonobo = callPackage ./platform/libbonobo { };
libbonoboui = callPackage ./platform/libbonoboui { };
gtkhtml = callPackage ./platform/gtkhtml { enchant = pkgs.enchant1; };
gtkhtml4 = callPackage ./platform/gtkhtml/4.x.nix { enchant = pkgs.enchant2; };
gtkglext = callPackage ./platform/gtkglext { };
#### DESKTOP
# Removed from recent GNOME releases, but still required
scrollkeeper = callPackage ./desktop/scrollkeeper { };
gtksourceview = callPackage ./desktop/gtksourceview {
autoreconfHook = pkgs.autoreconfHook269;
};
} // lib.optionalAttrs config.allowAliases {
inherit (pkgs)
# GTK Libs
glib glibmm atk atkmm cairo pango pangomm gdk_pixbuf gtkmm2 libcanberra-gtk2
# Included for backwards compatibility
libsoup libwnck2 gtk-doc gnome-doc-utils rarian
gvfs # added 2019-09-03
;
gtk = pkgs.gtk2;
gtkmm = pkgs.gtkmm2;
python_rsvg = self.gnome_python_desktop;
gtkdoc = pkgs.gtk-doc;
startup_notification = pkgs.libstartup_notification;
startupnotification = pkgs.libstartup_notification;
gnomedocutils = pkgs.gnome-doc-utils;
gnome-icon-theme = pkgs.gnome-icon-theme;
gnome_icon_theme = self.gnome-icon-theme;
gnomeicontheme = self.gnome-icon-theme;
gnome_common = gnome-common;
libglademm = throw "libglademm has been removed"; # 2022-01-15
})

View file

@ -0,0 +1,43 @@
{lib, stdenv, fetchpatch, fetchurl, autoreconfHook, pkg-config, atk, cairo, glib
, gnome-common, gtk2, pango
, libxml2Python, perl, intltool, gettext, gtk-mac-integration-gtk2 }:
with lib;
stdenv.mkDerivation rec {
pname = "gtksourceview";
version = "2.10.5";
src = fetchurl {
url = "mirror://gnome/sources/gtksourceview/2.10/${pname}-${version}.tar.bz2";
sha256 = "c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e";
};
patches = optionals stdenv.isDarwin [
(fetchpatch {
name = "change-igemacintegration-to-gtkosxapplication.patch";
url = "https://gitlab.gnome.org/GNOME/gtksourceview/commit/e88357c5f210a8796104505c090fb6a04c213902.patch";
sha256 = "0h5q79q9dqbg46zcyay71xn1pm4aji925gjd5j93v4wqn41wj5m7";
})
(fetchpatch {
name = "update-to-gtk-mac-integration-2.0-api.patch";
url = "https://gitlab.gnome.org/GNOME/gtksourceview/commit/ab46e552e1d0dae73f72adac8d578e40bdadaf95.patch";
sha256 = "0qzrbv4hpa0v8qbmpi2vp575n13lkrvp3cgllwrd2pslw1v9q3aj";
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
atk cairo glib gtk2
pango libxml2Python perl intltool
gettext
] ++ optionals stdenv.isDarwin [
autoreconfHook gnome-common gtk-mac-integration-gtk2
];
preConfigure = optionalString stdenv.isDarwin ''
intltoolize --force
'';
doCheck = false; # requires X11 daemon
}

View file

@ -0,0 +1,10 @@
--- jbsrc/jb.c.orig 2014-01-19 20:06:48.525462981 +0100
+++ jbsrc/jb.c 2014-01-19 20:07:36.087934897 +0100
@@ -425,7 +425,6 @@
*/
jb_compile_options_add_cflags(object->compile_options, "-std=c99");
jb_compile_options_add_cppflags(object->compile_options, "-D_BSD_SOURCE -D_POSIX_C_SOURCE=199309L");
- jb_compile_options_add_libs(object->compile_options, "-lbsd-compat");
}
jb_compile_options_add_string_defines(object->compile_options,

View file

@ -0,0 +1,22 @@
{ lib, stdenv, fetchurl, pkg-config, perlPackages, libxml2, libxslt, docbook_xml_dtd_42, automake, gettext }:
stdenv.mkDerivation rec {
pname = "scrollkeeper";
version = "0.3.14";
src = fetchurl {
url = "mirror://gnome/sources/scrollkeeper/${lib.versions.majorMinor version}/scrollkeeper-${version}.tar.bz2";
sha256 = "08n1xgj1f53zahwm0wpn3jid3rfbhi3iwby0ilaaldnid5qriqgc";
};
# The fuloong2f is not supported by scrollkeeper-0.3.14 config.guess
preConfigure = "
substituteInPlace extract/dtds/Makefile.am --replace /usr/bin/xmlcatalog xmlcatalog
cp ${automake}/share/automake*/config.{sub,guess} .
";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libxml2 libxslt gettext ]
++ (with perlPackages; [ perl XMLParser ]);
configureFlags = [ "--with-xml-catalog=${docbook_xml_dtd_42}/xml/dtd/docbook/catalog.xml" ];
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchurl, pkg-config, dbus-glib, glib, ORBit2, libxml2, polkit, python3, intltool }:
stdenv.mkDerivation rec {
pname = "gconf";
version = "3.2.6";
src = fetchurl {
url = "mirror://gnome/sources/GConf/${lib.versions.majorMinor version}/GConf-${version}.tar.xz";
sha256 = "0k3q9nh53yhc9qxf1zaicz4sk8p3kzq4ndjdsgpaa2db0ccbj4hr";
};
outputs = [ "out" "dev" "man" ];
buildInputs = [ ORBit2 libxml2 python3 ]
# polkit requires pam, which requires shadow.h, which is not available on
# darwin
++ lib.optional (!stdenv.isDarwin) polkit;
propagatedBuildInputs = [ glib dbus-glib ];
nativeBuildInputs = [ pkg-config intltool ];
configureFlags =
# fixes the "libgconfbackend-oldxml.so is not portable" error on darwin
lib.optional stdenv.isDarwin [ "--enable-static" ];
postPatch = ''
2to3 --write --nobackup gsettings/gsettings-schema-convert
'';
meta = with lib; {
homepage = "https://projects.gnome.org/gconf/";
description = "Deprecated system for storing application preferences";
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,51 @@
{ lib, stdenv, fetchurl, pkg-config, glib, libIDL, libintl }:
stdenv.mkDerivation rec {
pname = "ORBit2";
version = "2.14.19";
src = fetchurl {
url = "mirror://gnome/sources/ORBit2/${lib.versions.majorMinor version}/ORBit2-${version}.tar.bz2";
sha256 = "0l3mhpyym9m5iz09fz0rgiqxl2ym6kpkwpsp1xrr4aa80nlh1jam";
};
nativeBuildInputs = [ pkg-config libintl ];
propagatedBuildInputs = [ glib libIDL ];
outputs = [ "out" "dev" ];
preBuild = ''
sed 's/-DG_DISABLE_DEPRECATED//' -i linc2/src/Makefile
'';
preFixup = ''
moveToOutput "bin/orbit2-config" "$dev"
'';
# Parallel build fails due to missing internal library dependency:
# libtool --tag=CC --mode=link gcc ... -o orbit-name-server-2 ...
# ld: cannot find libname-server-2.a: No such file or directory
# It happens because orbit-name-server-2 should have libname-server-2.a
# in _DEPENDENCIES but does not. Instead of fixing it and regenerating
# Makefile.in let's just disable parallel build.
enableParallelBuilding = false;
meta = with lib; {
homepage = "https://developer-old.gnome.org/ORBit2/";
description = "A CORBA 2.4-compliant Object Request Broker";
platforms = platforms.unix;
maintainers = with maintainers; [ lovek323 ];
longDescription = ''
ORBit2 is a CORBA 2.4-compliant Object Request Broker (ORB) featuring
mature C, C++ and Python bindings. Bindings (in various degrees of
completeness) are also available for Perl, Lisp, Pascal, Ruby, and TCL;
others are in-progress. It supports POA, DII, DSI, TypeCode, Any, IR and
IIOP. Optional features including INS and threading are available. ORBit2
is engineered for the desktop workstation environment, with a focus on
performance, low resource usage, and security. The core ORB is written in
C, and runs under Linux, UNIX (BSD, Solaris, HP-UX, ...), and Windows.
ORBit2 is developed and released as open source software under GPL/LGPL.
'';
};
}

View file

@ -0,0 +1,19 @@
{ lib, stdenv, fetchurl, which }:
stdenv.mkDerivation rec {
pname = "gnome-common";
version = "2.34.0";
src = fetchurl {
url = "mirror://gnome/sources/gnome-common/${lib.versions.majorMinor version}/gnome-common-${version}.tar.bz2";
sha256 = "1pz13mpp09q5s3bikm8ml92s1g0scihsm4iipqv1ql3mp6d4z73s";
};
propagatedBuildInputs = [ which ]; # autogen.sh which is using gnome-common tends to require which
patches = [(fetchurl {
name = "gnome-common-patch";
url = "https://bug697543.bugzilla-attachments.gnome.org/attachment.cgi?id=240935";
sha256 = "17abp7czfzirjm7qsn2czd03hdv9kbyhk3lkjxg2xsf5fky7z7jl";
})];
}

View file

@ -0,0 +1,11 @@
{ lib, stdenv, fetchurl, intltool }:
stdenv.mkDerivation rec {
pname = "gnome-mime-data";
version = "2.18.0";
src = fetchurl {
url = "mirror://gnome/sources/gnome-mime-data/${lib.versions.majorMinor version}/gnome-mime-data-${version}.tar.bz2";
sha256 = "1mvg8glb2a40yilmyabmb7fkbzlqd3i3d31kbkabqnq86xdnn69p";
};
nativeBuildInputs = [ intltool ];
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libxml2, bzip2, openssl, dbus-glib
, glib, gamin, cdparanoia, intltool, GConf, gnome_mime_data, avahi, acl }:
stdenv.mkDerivation rec {
pname = "gnome-vfs";
version = "2.24.4";
src = fetchurl {
url = "mirror://gnome/sources/gnome-vfs/${lib.versions.majorMinor version}/gnome-vfs-${version}.tar.bz2";
sha256 = "1ajg8jb8k3snxc7rrgczlh8daxkjidmcv3zr9w809sq4p2sn9pk2";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ intltool pkg-config ];
buildInputs =
[ libxml2 bzip2 openssl dbus-glib gamin cdparanoia
gnome_mime_data avahi acl
];
propagatedBuildInputs = [ GConf glib ];
# struct SSL is opaque in openssl-1.1; and the SSL_free() man page
# says that one should not free members of it manually (in both
# the openssl-1.0 and openssl-1.1 man pages).
# https://bugs.gentoo.org/592540
patches = [ (fetchpatch {
name = "gnome-vfs-2.24.4-openssl-1.1.patch";
url = "https://bugs.gentoo.org/attachment.cgi?id=535944";
sha256 = "1q4icapvmwmd5rjah7rr0bqazzk5cg36znmjlpra20n9y27nz040";
extraPrefix = "";
})
];
postPatch = "find . -name Makefile.in | xargs sed 's/-DG_DISABLE_DEPRECATED//g' -i ";
doCheck = false; # needs dbus daemon
}

View file

@ -0,0 +1,69 @@
{ lib, stdenv
, fetchFromGitLab
, pkg-config
, gtk-doc
, autoconf
, automake
, which
, libtool
, gobject-introspection
, glib
, gtk2
, libGLU
, libGL
, pango
, xorg
}:
stdenv.mkDerivation rec {
pname = "gtkglext";
version = "unstable-2019-12-19";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "Archive";
repo = pname;
# build fixes
# https://gitlab.gnome.org/Archive/gtkglext/merge_requests/1
rev = "ad95fbab68398f81d7a5c895276903b0695887e2";
sha256 = "1d1bp4635nla7d07ci40c7w4drkagdqk8wg93hywvdipmjfb4yqb";
};
nativeBuildInputs = [
pkg-config
gtk-doc
autoconf
automake
which
libtool
gobject-introspection
];
buildInputs = [
glib
gtk2
libGLU
libGL
pango
xorg.libX11
xorg.libXmu
];
preConfigure = ''
NOCONFIGURE=1 ./autogen.sh
'';
meta = with lib; {
homepage = "https://projects.gnome.org/gtkglext/";
description = "GtkGLExt, an OpenGL extension to GTK";
longDescription = ''
GtkGLExt is an OpenGL extension to GTK. It provides additional GDK
objects which support OpenGL rendering in GTK and GtkWidget API
add-ons to make GTK widgets OpenGL-capable. In contrast to Janne
Löf's GtkGLArea, GtkGLExt provides a GtkWidget API that enables
OpenGL drawing for standard and custom GTK widgets.
'';
license = licenses.lgpl2Plus;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,17 @@
diff -Naur gtkhtml-3.32.2-orig/configure gtkhtml-3.32.2/configure
--- gtkhtml-3.32.2-orig/configure 2011-02-05 23:12:31.000000000 -0500
+++ gtkhtml-3.32.2/configure 2011-04-22 13:03:18.228874636 -0400
@@ -5761,12 +5761,7 @@
if test "x${enable_deprecated_flags}" = "xyes"; then
- list="-DG_DISABLE_DEPRECATED
- -DPANGO_DISABLE_DEPRECATED
- -DGDK_DISABLE_DEPRECATED
- -DGDK_PIXBUF_DISABLE_DEPRECATED
- -DGTK_DISABLE_DEPRECATED
- -DGNOME_DISABLE_DEPRECATED"
+ list=""
flags_supported=""
flags_unsupported=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported compiler flags" >&5

View file

@ -0,0 +1,30 @@
{ stdenv, fetchFromGitLab, pkg-config, gtk3, intltool, autoreconfHook, fetchpatch
, GConf, enchant, isocodes, gnome-icon-theme, gsettings-desktop-schemas }:
stdenv.mkDerivation rec {
version = "4.10.0";
pname = "gtkhtml";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "Archive";
repo = "gtkhtml";
rev = "master";
sha256 = "sha256-jL8YADvhW0o6I/2Uo5FNARMAnSbvtmFp+zWH1yCVvQk=";
};
patches = [
# Enables enchant2 support.
# Upstream is dead, no further releases are coming.
(fetchpatch {
name ="enchant-2.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/enchant-2.patch?h=gtkhtml4&id=0218303a63d64c04d6483a6fe9bb55063fcfaa43";
sha256 = "f0OToWGHZwxvqf+0qosfA9FfwJ/IXfjIPP5/WrcvArI=";
extraPrefix = "";
})
];
propagatedBuildInputs = [ gsettings-desktop-schemas gtk3 gnome-icon-theme GConf ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ intltool enchant isocodes autoreconfHook ];
}

View file

@ -0,0 +1,21 @@
{ lib, stdenv, fetchurl, pkg-config, gtk2, intltool,
GConf, enchant, isocodes, gnome-icon-theme }:
stdenv.mkDerivation rec {
pname = "gtkhtml";
version = "3.32.2";
src = fetchurl {
url = "mirror://gnome/sources/gtkhtml/${lib.versions.majorMinor version}/gtkhtml-${version}.tar.bz2";
sha256 = "17z3jwvpn8waz7bhwrk7a6vs9pad6sqmlxxcqwvxxq89ywy0ail7";
};
#From Debian, fixes build issue described here:
#http://www.mail-archive.com/debian-bugs-rc@lists.debian.org/msg250091.html
patches = [ ./01_remove-disable-deprecated.patch ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 intltool GConf enchant isocodes gnome-icon-theme ];
NIX_LDFLAGS = "-lgthread-2.0";
}

View file

@ -0,0 +1,15 @@
{ lib, stdenv, fetchurl, flex, bison, pkg-config, glib, gettext }:
stdenv.mkDerivation rec {
pname = "libIDL";
version = "0.8.14";
src = fetchurl {
url = "mirror://gnome/sources/libIDL/${lib.versions.majorMinor version}/libIDL-${version}.tar.bz2";
sha256 = "08129my8s9fbrk0vqvnmx6ph4nid744g5vbwphzkaik51664vln5";
};
buildInputs = [ glib gettext ];
nativeBuildInputs = [ flex bison pkg-config ];
}

View file

@ -0,0 +1,10 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "libart_lgpl";
version = "2.3.21";
src = fetchurl {
url = "mirror://gnome/sources/libart_lgpl/${lib.versions.majorMinor version}/libart_lgpl-${version}.tar.bz2";
sha256 = "1yknfkyzgz9s616is0l9gp5aray0f2ry4dw533jgzj8gq5s1xhgx";
};
}

View file

@ -0,0 +1,21 @@
{ lib, stdenv, fetchurl, flex, bison, pkg-config, glib, libxml2, popt
, intltool, ORBit2, procps }:
stdenv.mkDerivation rec {
pname = "libbonobo";
version = "2.32.1";
src = fetchurl {
url = "mirror://gnome/sources/libbonobo/${lib.versions.majorMinor version}/libbonobo-${version}.tar.bz2";
sha256 = "0swp4kk6x7hy1rvd1f9jba31lvfc6qvafkvbpg9h0r34fzrd8q4i";
};
outputs = [ "out" "dev" ];
preConfigure = # still using stuff deprecated in new glib versions
"sed 's/-DG_DISABLE_DEPRECATED//g' -i configure activation-server/Makefile.in";
nativeBuildInputs = [ flex bison pkg-config intltool procps ];
buildInputs = [ libxml2 ];
propagatedBuildInputs = [ popt glib ORBit2 ];
}

View file

@ -0,0 +1,18 @@
{ lib, stdenv, fetchurl, bison, pkg-config, popt, libxml2, gtk2, libtool
, intltool, libbonobo, GConf, libgnomecanvas, libgnome, libglade }:
stdenv.mkDerivation rec {
pname = "libbonoboui";
version = "2.24.5";
src = fetchurl {
url = "mirror://gnome/sources/libbonoboui/${lib.versions.majorMinor version}/libbonoboui-${version}.tar.bz2";
sha256 = "1kbgqh7bw0fdx4f1a1aqwpff7gp5mwhbaz60c6c98bc4djng5dgs";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config intltool ];
buildInputs = [ bison popt gtk2 libxml2 GConf libglade libtool ];
propagatedBuildInputs = [ libbonobo libgnomecanvas libgnome ];
}

View file

@ -0,0 +1,20 @@
{ lib, stdenv, fetchurl, pkg-config, gtk2, libxml2, gettext }:
stdenv.mkDerivation rec {
pname = "libglade";
version = "2.6.4";
src = fetchurl {
url = "mirror://gnome/sources/libglade/${lib.versions.majorMinor version}/libglade-${version}.tar.bz2";
sha256 = "1v2x2s04jry4gpabws92i0wq2ghd47yr5n9nhgnkd7c38xv1wdk4";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 gettext ];
NIX_LDFLAGS = "-lgmodule-2.0";
propagatedBuildInputs = [ libxml2 ];
}

View file

@ -0,0 +1,23 @@
{ lib, stdenv, fetchurl, pkg-config, glib, popt, zlib, libcanberra-gtk2
, intltool, libbonobo, GConf, gnome_vfs, libtool, libogg
}:
stdenv.mkDerivation rec {
pname = "libgnome";
version = "2.32.1";
src = fetchurl {
url = "mirror://gnome/sources/libgnome/${lib.versions.majorMinor version}/libgnome-${version}.tar.bz2";
sha256 = "197pnq8y0knqjhm2fg4j6hbqqm3qfzfnd0irhwxpk1b4hqb3kimj";
};
patches = [ ./new-glib.patch ];
/* There's a comment containing an invalid utf-8 sequence, breaking glib-mkenums. */
postPatch = "sed '/returns the true filename/d' -i libgnome/gnome-config.h";
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ popt zlib intltool GConf gnome_vfs libcanberra-gtk2 libtool ];
propagatedBuildInputs = [ glib libbonobo libogg ];
}

View file

@ -0,0 +1,65 @@
Porting libgnome to newer glib:
* remove g_thread_init and g_thread_supported, which are longer needed
https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#g-thread-init
* replace GStaticRecMutex by GRecMutex
https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#GStaticRecMutex
diff --git a/libgnome/gnome-i18n.c b/libgnome/gnome-i18n.c
index 531c56c..f13d61e 100644
--- a/libgnome/gnome-i18n.c
+++ b/libgnome/gnome-i18n.c
@@ -55,12 +55,14 @@
const GList *
gnome_i18n_get_language_list (const gchar *ignored)
{
- static GStaticRecMutex lang_list_lock = G_STATIC_REC_MUTEX_INIT;
+ static GRecMutex lang_list_lock;
+ g_rec_mutex_init (&lang_list_lock);
+
static GList *list = NULL;
const char * const* langs;
int i;
- g_static_rec_mutex_lock (&lang_list_lock);
+ g_rec_mutex_lock (&lang_list_lock);
if (list == NULL) {
langs = g_get_language_names ();
@@ -71,7 +73,7 @@ gnome_i18n_get_language_list (const gchar *ignored)
list = g_list_reverse (list);
}
- g_static_rec_mutex_unlock (&lang_list_lock);
+ g_rec_mutex_unlock (&lang_list_lock);
return list;
}
diff --git a/libgnome/gnome-init.c b/libgnome/gnome-init.c
index fe3efd4..c6619af 100644
--- a/libgnome/gnome-init.c
+++ b/libgnome/gnome-init.c
@@ -115,9 +115,6 @@ gnome_bonobo_module_info_get (void)
static void
bonobo_activation_pre_args_parse (GnomeProgram *program, GnomeModuleInfo *mod_info)
{
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
if (!bonobo_activation_is_initialized ())
bonobo_activation_preinit (program, mod_info);
}
diff --git a/libgnome/gnome-program.c b/libgnome/gnome-program.c
index 739765e..cd14999 100644
--- a/libgnome/gnome-program.c
+++ b/libgnome/gnome-program.c
@@ -1878,10 +1878,6 @@ gnome_program_init (const char *app_id, const char *app_version,
GnomeProgram *program;
va_list args;
- /* g_thread_init() has to be the first GLib function called ever */
- if (!g_threads_got_initialized)
- g_thread_init (NULL);
-
g_type_init ();
va_start(args, first_property_name);

View file

@ -0,0 +1,17 @@
{ lib, stdenv, fetchurl, pkg-config, gtk2, intltool, libart_lgpl, libglade }:
stdenv.mkDerivation rec {
pname = "libgnomecanvas";
version = "2.30.3";
src = fetchurl {
url = "mirror://gnome/sources/libgnomecanvas/${lib.versions.majorMinor version}/libgnomecanvas-${version}.tar.bz2";
sha256 = "0h6xvswbqspdifnyh5pm2pqq55yp3kn6yrswq7ay9z49hkh7i6w5";
};
outputs = [ "out" "dev" ];
buildInputs = [ libglade ];
nativeBuildInputs = [ pkg-config intltool ];
propagatedBuildInputs = [ libart_lgpl gtk2 ];
}

View file

@ -0,0 +1,14 @@
{ lib, stdenv, fetchurl, pkg-config, libgnomecanvas, gtkmm2 }:
stdenv.mkDerivation rec {
pname = "libgnomecanvasmm";
version = "2.26.0";
src = fetchurl {
url = "mirror://gnome/sources/libgnomecanvasmm/${lib.versions.majorMinor version}/libgnomecanvasmm-${version}.tar.bz2";
sha256 = "996577f97f459a574919e15ba7fee6af8cda38a87a98289e9a4f54752d83e918";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libgnomecanvas gtkmm2 ];
}

View file

@ -0,0 +1,285 @@
From ae783efde4fa69578651994505462f02b8639220 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Tue, 7 Aug 2012 06:53:09 -0400
Subject: [PATCH] Use CUPS-1.6 IPP API getter/setter functions
CUPS 1.6 makes various structures private and introduces these ippGet
and ippSet functions for all of the fields in these structures.
http://www.cups.org/str.php?L3928
We define our own accessors when building against CUPS < 1.6.
Based on work by Jiri Popelka <jpopelka@redhat.com> at
https://bugzilla.gnome.org/show_bug.cgi?id=679759
---
libgnomecups/gnome-cups-printer.c | 48 +++++++++++++++++++++++++++++-------
libgnomecups/gnome-cups-queue.c | 43 +++++++++++++++++++++++++++------
libgnomecups/gnome-cups-request.c | 44 ++++++++++++++++++++++++++++-----
3 files changed, 110 insertions(+), 25 deletions(-)
diff --git a/libgnomecups/gnome-cups-printer.c b/libgnomecups/gnome-cups-printer.c
index c924af0..f5e1ef7 100644
--- a/libgnomecups/gnome-cups-printer.c
+++ b/libgnomecups/gnome-cups-printer.c
@@ -37,6 +37,34 @@
#define UPDATE_TIMEOUT 5000
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
+#define HAVE_CUPS_1_6 1
+#endif
+
+#ifndef HAVE_CUPS_1_6
+#define ippGetCount(attr) attr->num_values
+#define ippGetName(attr) attr->name
+#define ippGetInteger(attr, element) attr->values[element].integer
+#define ippGetString(attr, element, language) attr->values[element].string.text
+
+static ipp_attribute_t *
+ippFirstAttribute(ipp_t *ipp)
+{
+ if (!ipp)
+ return (NULL);
+ return (ipp->current = ipp->attrs);
+}
+
+static ipp_attribute_t *
+ippNextAttribute(ipp_t *ipp)
+{
+ if (!ipp || !ipp->current)
+ return (NULL);
+ return (ipp->current = ipp->current->next);
+}
+#endif
+
+
struct _GnomeCupsPPDFile {
char name[1];
};
@@ -173,9 +201,9 @@ map_reasons (GnomeCupsPrinter *printer,
printer->details->state_reasons = NULL;
/* cf. RFC2911 4.4.12 */
- for (i = 0; i < attr->num_values; i++) {
+ for (i = 0; i < ippGetCount (attr); i++) {
const char *p;
- const char *keyword = attr->values [i].string.text;
+ const char *keyword = ippGetString (attr, i, NULL);
reason = g_new (GnomeCupsPrinterReason, 1);
@@ -224,8 +252,8 @@ gnome_cups_printer_get_info (GnomeCupsPrinter *printer)
return printer->details->info;
}
-#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if ((v) != attr->values[0].integer) { changed = TRUE; } (v) = attr->values[0].integer; }}
-#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (attr->name, (a))) { if (!v || strcmp (v, attr->values[0].string.text)) { g_free (v); changed = TRUE; (v) = g_strdup (attr->values[0].string.text); }}}
+#define MAP_INT(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if ((v) != ippGetInteger (attr, 0)) { changed = TRUE; } (v) = ippGetInteger (attr, 0); }}
+#define MAP_STRING(v,a) {if (!g_ascii_strcasecmp (ippGetName (attr), (a))) { if (!v || strcmp (v, ippGetString (attr, 0, NULL))) { g_free (v); changed = TRUE; (v) = g_strdup (ippGetString (attr, 0, NULL)); }}}
static void
attributes_update_cb (guint id,
@@ -243,14 +271,14 @@ attributes_update_cb (guint id,
changed = FALSE;
if (!error && response) {
- for (attr = response->attrs; attr != NULL; attr = attr->next) {
- if (!attr->name) {
+ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) {
+ if (!ippGetName (attr)) {
continue;
}
- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !strcmp (attr->name, "attributes-charset")) {
+ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !strcmp (ippGetName (attr), "attributes-charset")) {
continue;
}
- if (!g_ascii_strcasecmp (attr->name, "printer-state-reasons")) {
+ if (!g_ascii_strcasecmp (ippGetName (attr), "printer-state-reasons")) {
map_reasons (printer, attr);
}
MAP_INT (printer->details->state, "printer-state");
@@ -570,7 +598,7 @@ get_default (void)
attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME);
if (attr) {
- name = g_strdup (attr->values[0].string.text);
+ name = g_strdup (ippGetString (attr, 0, NULL));
} else {
name = NULL;
}
@@ -698,7 +726,7 @@ get_printer_names (void)
attr = ippFindAttribute (response, "printer-name", IPP_TAG_NAME);
while (attr) {
ret = g_list_prepend (ret,
- g_strdup (attr->values[0].string.text));
+ g_strdup (ippGetString (attr, 0, NULL)));
attr = ippFindNextAttribute (response,
"printer-name",
diff --git a/libgnomecups/gnome-cups-queue.c b/libgnomecups/gnome-cups-queue.c
index 9f98ed9..298db42 100644
--- a/libgnomecups/gnome-cups-queue.c
+++ b/libgnomecups/gnome-cups-queue.c
@@ -15,6 +15,33 @@
#define UPDATE_TIMEOUT 3000
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
+#define HAVE_CUPS_1_6 1
+#endif
+
+#ifndef HAVE_CUPS_1_6
+#define ippGetName(attr) attr->name
+#define ippGetInteger(attr, element) attr->values[element].integer
+#define ippGetString(attr, element, language) attr->values[element].string.text
+
+static ipp_attribute_t *
+ippFirstAttribute(ipp_t *ipp)
+{
+ if (!ipp)
+ return (NULL);
+ return (ipp->current = ipp->attrs);
+}
+
+static ipp_attribute_t *
+ippNextAttribute(ipp_t *ipp)
+{
+ if (!ipp || !ipp->current)
+ return (NULL);
+ return (ipp->current = ipp->current->next);
+}
+#endif
+
+
struct _GnomeCupsQueueDetails {
char *queue_name;
GList *jobs;
@@ -199,8 +226,8 @@ finish_job (GnomeCupsJob *job)
job->size = job->size * 1024;
}
-#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (attr->values[0].string.text);}}
-#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (attr->name, (src))) { (dest) = attr->values[0].integer; } }
+#define MAP_STR(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { if ((dest) != NULL) g_free (dest); (dest) = g_strdup (ippGetString (attr, 0, NULL));}}
+#define MAP_INT(dest, src) { if (!g_ascii_strcasecmp (ippGetName (attr), (src))) { (dest) = ippGetInteger (attr, 0); } }
static void
get_jobs_cb (guint id,
@@ -231,8 +258,8 @@ get_jobs_cb (guint id,
if (response) {
job = g_new0 (GnomeCupsJob, 1);
- for (attr = response->attrs; attr != NULL; attr = attr->next) {
- if (attr->name == NULL) {
+ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) {
+ if (ippGetName (attr) == NULL) {
if (job->name) {
finish_job (job);
jobs = g_list_prepend (jobs, job);
@@ -244,7 +271,7 @@ get_jobs_cb (guint id,
continue;
}
- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) {
+ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) {
continue;
}
@@ -355,8 +382,8 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue,
if (response) {
job = g_new0 (GnomeCupsJob, 1);
- for (attr = response->attrs; attr != NULL; attr = attr->next) {
- if (attr->name == NULL) {
+ for (attr = ippFirstAttribute (response); attr != NULL; attr = ippNextAttribute (response)) {
+ if (ippGetName (attr) == NULL) {
if (job->name) {
finish_job (job);
} else {
@@ -366,7 +393,7 @@ gnome_cups_queue_get_job_nocache (GnomeCupsQueue *queue,
break;
}
- if (!g_ascii_strcasecmp (attr->name, "attributes-charset") || !g_ascii_strcasecmp (attr->name, "attributes-charset")) {
+ if (!g_ascii_strcasecmp (ippGetName (attr), "attributes-charset") || !g_ascii_strcasecmp (ippGetName (attr), "attributes-charset")) {
continue;
}
diff --git a/libgnomecups/gnome-cups-request.c b/libgnomecups/gnome-cups-request.c
index c94f623..13f0948 100644
--- a/libgnomecups/gnome-cups-request.c
+++ b/libgnomecups/gnome-cups-request.c
@@ -19,6 +19,36 @@
#define STOP_UNUSED_THREADS_TIMEOUT 60
#define CLOSE_UNUSED_CONNECTIONS_TIMEOUT 30
+#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
+#define HAVE_CUPS_1_6 1
+#endif
+
+#ifndef HAVE_CUPS_1_6
+#define ippGetCount(attr) attr->num_values
+#define ippGetValueTag(attr) attr->value_tag
+#define ippGetName(attr) attr->name
+#define ippGetBoolean(attr, element) attr->values[element].boolean
+#define ippGetInteger(attr, element) attr->values[element].integer
+#define ippGetString(attr, element, language) attr->values[element].string.text
+
+static ipp_attribute_t *
+ippFirstAttribute(ipp_t *ipp)
+{
+ if (!ipp)
+ return (NULL);
+ return (ipp->current = ipp->attrs);
+}
+
+static ipp_attribute_t *
+ippNextAttribute(ipp_t *ipp)
+{
+ if (!ipp || !ipp->current)
+ return (NULL);
+ return (ipp->current = ipp->current->next);
+}
+#endif
+
+
typedef struct
{
GMutex *mutex;
@@ -276,14 +306,14 @@ dump_request (ipp_t const *req)
unsigned i;
ipp_attribute_t *attr;
- for (attr = req->attrs; attr != NULL; attr = attr->next) {
- g_print ("%s", attr->name);
- for (i = 0 ; i < attr->num_values ; i++) {
+ for (attr = ippFirstAttribute (req); attr != NULL; attr = ippNextAttribute (req)) {
+ g_print ("%s", ippGetName (attr));
+ for (i = 0 ; i < ippGetCount (attr) ; i++) {
g_print ("\t[%d] = ", i);
- switch (attr->value_tag & ~IPP_TAG_COPY) {
+ switch (ippGetValueTag (attr) & ~IPP_TAG_COPY) {
case IPP_TAG_INTEGER:
case IPP_TAG_ENUM:
- g_print ("%d\n", attr->values[i].integer);
+ g_print ("%d\n", ippGetInteger (attr, i));
break;
case IPP_TAG_STRING:
@@ -294,11 +324,11 @@ dump_request (ipp_t const *req)
case IPP_TAG_CHARSET:
case IPP_TAG_LANGUAGE:
case IPP_TAG_MIMETYPE:
- g_print ("'%s'\n", attr->values[i].string.text);
+ g_print ("'%s'\n", ippGetString (attr, i, NULL));
break;
case IPP_TAG_BOOLEAN:
- g_print ("%s\n", (int)attr->values[i].boolean ? "true" : "false");
+ g_print ("%s\n", (int)ippGetBoolean (attr, i) ? "true" : "false");
break;
default:
--
1.7.8.6

View file

@ -0,0 +1,20 @@
{ lib, stdenv, fetchurl, pkg-config, gtk2, gettext, libxml2, intltool, libart_lgpl }:
stdenv.mkDerivation rec {
pname = "libgnomecups";
version = "0.2.3";
src = fetchurl {
url = "mirror://gnome/sources/libgnomecups/${lib.versions.majorMinor version}/libgnomecups-${version}.tar.bz2";
sha256 = "0a8xdaxzz2wc0n1fjcav65093gixzyac3948l8cxx1mk884yhc71";
};
hardeningDisable = [ "format" ];
patches = [ ./glib.patch ./cups_1.6.patch ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 gettext intltool libart_lgpl ];
propagatedBuildInputs = [ libxml2 ];
}

View file

@ -0,0 +1,38 @@
From d84eee9450b3b6f6155074915efc61bedcc8d446 Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dimstar@opensuse.org>
Date: Sun, 27 Nov 2011 21:36:41 +0100
Subject: [PATCH] Fix: Only glib.h can be included
---
libgnomecups/gnome-cups-i18n.c | 2 +-
libgnomecups/gnome-cups-init.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libgnomecups/gnome-cups-i18n.c b/libgnomecups/gnome-cups-i18n.c
index 8987c5c..127756d 100644
--- a/libgnomecups/gnome-cups-i18n.c
+++ b/libgnomecups/gnome-cups-i18n.c
@@ -1,5 +1,5 @@
#include <config.h>
-#include <glib/gmacros.h>
+#include <glib.h>
#include "gnome-cups-i18n.h"
#ifdef ENABLE_NLS
diff --git a/libgnomecups/gnome-cups-init.h b/libgnomecups/gnome-cups-init.h
index 22b682a..c4600fc 100644
--- a/libgnomecups/gnome-cups-init.h
+++ b/libgnomecups/gnome-cups-init.h
@@ -1,8 +1,7 @@
#ifndef GNOME_CUPS_INIT
#define GNOME_CUPS_INIT
-#include <glib/gtypes.h>
-#include <glib/gmacros.h>
+#include <glib.h>
G_BEGIN_DECLS
--
1.7.7

View file

@ -0,0 +1,21 @@
From 9b82b7e75b83395e7c5692085e1934202cf7f65f Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu@freedesktop.org>
Date: Wed, 12 Oct 2011 15:08:59 +0000
Subject: Add missing include
https://bugzilla.gnome.org/show_bug.cgi?id=653388
---
diff --git a/libgnomeprint/modules/cups/gnome-print-cups-transport.c b/libgnomeprint/modules/cups/gnome-print-cups-transport.c
index aeb7111..85de91b 100644
--- a/libgnomeprint/modules/cups/gnome-print-cups-transport.c
+++ b/libgnomeprint/modules/cups/gnome-print-cups-transport.c
@@ -34,6 +34,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <stdio.h>
#include <unistd.h>
#include <locale.h>
--
cgit v0.9.0.2

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, gtk2, gettext, libxml2, intltool, libart_lgpl
, libgnomecups, bison, flex }:
stdenv.mkDerivation rec {
pname = "libgnomeprint";
version = "2.18.8";
src = fetchurl {
url = "mirror://gnome/sources/libgnomeprint/${lib.versions.majorMinor version}/libgnomeprint-${version}.tar.bz2";
sha256 = "1034ec8651051f84d2424e7a1da61c530422cc20ce5b2d9e107e1e46778d9691";
};
patches = [
./bug653388.patch
# Fix compatibility with bison 3
(fetchpatch {
url = "https://github.com/pld-linux/libgnomeprint/raw/54c0f9c3675b86c53f6d77a5bc526ce9ef0e38cd/bison3.patch";
sha256 = "1sp04jbv34i1gcwf377hhmwdsmqzig70dd06rjz1isb6zwh4y01l";
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 gettext intltool libart_lgpl libgnomecups bison flex ];
propagatedBuildInputs = [ libxml2 ];
meta = with lib; {
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,14 @@
{ lib, stdenv, fetchurl, pkg-config, gtk2, gettext, intltool, libgnomecanvas, libgnomeprint, gnome-icon-theme }:
stdenv.mkDerivation rec {
pname = "libgnomeprintui";
version = "2.18.6";
src = fetchurl {
url = "mirror://gnome/sources/libgnomeprintui/${lib.versions.majorMinor version}/libgnomeprintui-${version}.tar.bz2";
sha256 = "0spl8vinb5n6n1krnfnr61dwaxidg67h8j94z9p59k2xdsvfashm";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 gettext intltool libgnomecanvas libgnomeprint gnome-icon-theme];
}

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libxml2, xorg, glib, pango
, intltool, libgnome, libgnomecanvas, libbonoboui, GConf, libtool
, gnome_vfs, libgnome-keyring, libglade }:
stdenv.mkDerivation rec {
pname = "libgnomeui";
version = "2.24.5";
src = fetchurl {
url = "mirror://gnome/sources/libgnomeui/${lib.versions.majorMinor version}/libgnomeui-${version}.tar.bz2";
sha256 = "03rwbli76crkjl6gp422wrc9lqpl174k56cp9i96b7l8jlj2yddf";
};
outputs = [ "out" "dev" ];
patches = [
(fetchpatch {
name = "0001-gnome-scores.h-Convert-to-UTF-8.patch";
url = "https://gitlab.gnome.org/Archive/libgnomeui/-/commit/30334c28794ef85d8973f4ed0779b5ceed6594f2.diff";
sha256 = "1sn8j8dkam14wfkpw8nga3gk63wniff243mzv3jp0fvv52q8sqhk";
})
];
nativeBuildInputs = [ pkg-config intltool ];
buildInputs =
[ xorg.xlibsWrapper libxml2 GConf pango glib libgnome-keyring libglade libtool ];
propagatedBuildInputs = [ libgnome libbonoboui libgnomecanvas gnome_vfs ];
}

View file

@ -0,0 +1,17 @@
{ lib, stdenv, fetchurl, pkg-config, gtk2, gettext, libxml2 }:
stdenv.mkDerivation rec {
pname = "libgtkhtml";
version = "2.11.1";
src = fetchurl {
url = "mirror://gnome/sources/libgtkhtml/${lib.versions.majorMinor version}/libgtkhtml-${version}.tar.bz2";
sha256 = "0msajafd42545dxzyr5zqka990cjrxw2yz09ajv4zs8m1w6pm9rw";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 gettext ];
propagatedBuildInputs = [ libxml2 ];
hardeningDisable = [ "format" ];
}