glib: openEuler init
This commit is contained in:
commit
8e3f96033a
1112
glib-1.2.10-autotools.patch
Normal file
1112
glib-1.2.10-autotools.patch
Normal file
File diff suppressed because it is too large
Load Diff
29
glib-1.2.10-format.patch
Normal file
29
glib-1.2.10-format.patch
Normal file
@ -0,0 +1,29 @@
|
||||
--- glib-1.2.10/grel.c.format
|
||||
+++ glib-1.2.10/grel.c
|
||||
@@ -413,7 +413,7 @@ g_relation_print_one (gpointer tuple_key
|
||||
}
|
||||
|
||||
g_string_append (gstring, "]");
|
||||
- g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, gstring->str);
|
||||
+ g_log (g_log_domain_glib, G_LOG_LEVEL_INFO, "%s", gstring->str);
|
||||
g_string_free (gstring, TRUE);
|
||||
}
|
||||
|
||||
--- glib-1.2.10/testglib.c.format
|
||||
+++ glib-1.2.10/testglib.c
|
||||
@@ -277,6 +277,9 @@ my_traverse (gpointer key,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+/* This program explicitly tests for a NULL format string */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic warning "-Wformat-security"
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
@@ -918,4 +921,5 @@ main (int argc,
|
||||
|
||||
return 0;
|
||||
}
|
||||
+#pragma GCC diagnostic pop
|
||||
|
||||
11
glib-1.2.10-gcc34.patch
Normal file
11
glib-1.2.10-gcc34.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- glib-1.2.10/glib.h.gcc34 2004-06-21 09:15:12.000000000 -0400
|
||||
+++ glib-1.2.10/glib.h 2004-06-21 09:15:22.000000000 -0400
|
||||
@@ -272,7 +272,7 @@
|
||||
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
|
||||
* macros, so we can refer to them as strings unconditionally.
|
||||
*/
|
||||
-#ifdef __GNUC__
|
||||
+#if defined (__GNUC__) && (__GNUC__ < 3)
|
||||
#define G_GNUC_FUNCTION __FUNCTION__
|
||||
#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
|
||||
#else /* !__GNUC__ */
|
||||
11
glib-1.2.10-gcc5.patch
Normal file
11
glib-1.2.10-gcc5.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- glib-1.2.10/glib.h.gcc5
|
||||
+++ glib-1.2.10/glib.h
|
||||
@@ -204,7 +204,7 @@ extern "C" {
|
||||
#ifndef G_INLINE_FUNC
|
||||
# ifdef __GNUC__
|
||||
# ifdef __OPTIMIZE__
|
||||
-# define G_INLINE_FUNC extern inline
|
||||
+# define G_INLINE_FUNC extern inline __attribute__ ((__gnu_inline__))
|
||||
# else
|
||||
# undef G_CAN_INLINE
|
||||
# define G_INLINE_FUNC extern
|
||||
16
glib-1.2.10-isowarning.patch
Normal file
16
glib-1.2.10-isowarning.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- glib-1.2.10/glib.h.isowarning Mon Feb 26 22:44:38 2001
|
||||
+++ glib-1.2.10/glib.h Sat Jul 21 19:36:31 2001
|
||||
@@ -1291,6 +1291,13 @@
|
||||
#ifndef G_LOG_DOMAIN
|
||||
#define G_LOG_DOMAIN ((gchar*) 0)
|
||||
#endif /* G_LOG_DOMAIN */
|
||||
+
|
||||
+/* Suppress warnings when GCC is in -pedantic mode and not -std=c99
|
||||
+ */
|
||||
+#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
|
||||
+#pragma GCC system_header
|
||||
+#endif
|
||||
+
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define g_error(...) g_log (G_LOG_DOMAIN, \
|
||||
G_LOG_LEVEL_ERROR, \
|
||||
31
glib-1.2.10-multilib.patch
Normal file
31
glib-1.2.10-multilib.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- glib-1.2.10/glib-config.in.multilib 2007-01-11 10:00:48.000000000 -0500
|
||||
+++ glib-1.2.10/glib-config.in 2007-01-11 10:13:25.000000000 -0500
|
||||
@@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
-prefix=@prefix@
|
||||
-exec_prefix=@exec_prefix@
|
||||
+[ -z "$PKG_CONFIG" ] && PKG_CONFIG="pkg-config"
|
||||
+prefix=`${PKG_CONFIG} --variable prefix glib`
|
||||
+exec_prefix=`${PKG_CONFIG} --variable exec_prefix glib`
|
||||
+libdir=`${PKG_CONFIG} --variable libdir glib`
|
||||
+includedir=`${PKG_CONFIG} --variable includedir glib`
|
||||
exec_prefix_set=no
|
||||
|
||||
usage()
|
||||
@@ -88,7 +91,7 @@
|
||||
if test "$lib_gthread" = "yes"; then
|
||||
cflags="$cflags @G_THREAD_CFLAGS@"
|
||||
fi
|
||||
- echo -I@includedir@/glib-1.2 -I@libdir@/glib/include $includes $cflags
|
||||
+ echo -I${includedir}/glib-1.2 -I${libdir}/glib/include $includes $cflags
|
||||
fi
|
||||
if test "$echo_libs" = "yes"; then
|
||||
libsp=""
|
||||
@@ -104,5 +107,5 @@
|
||||
libsp="@G_MODULE_LDFLAGS@ -lgmodule $libsp"
|
||||
libsa="$libsa @G_MODULE_LIBS@"
|
||||
fi
|
||||
- echo -L@libdir@ $libsp $libsa
|
||||
+ echo -L${libdir} $libsp $libsa
|
||||
fi
|
||||
48
glib-1.2.10-no_undefined.patch
Normal file
48
glib-1.2.10-no_undefined.patch
Normal file
@ -0,0 +1,48 @@
|
||||
--- glib-1.2.10/gthread/Makefile.am.no_undefined 1999-08-26 08:09:43.000000000 -0500
|
||||
+++ glib-1.2.10/gthread/Makefile.am 2006-05-04 08:38:36.000000000 -0500
|
||||
@@ -17,9 +17,11 @@
|
||||
libgthread_la_LDFLAGS = \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
||||
-release $(LT_RELEASE) \
|
||||
+ -no-undefined -Wl,--no-undefined \
|
||||
-export-dynamic
|
||||
|
||||
-libgthread_la_LIBADD = @G_THREAD_LIBS@
|
||||
+libgthread_la_DEPENDENCIES = $(libglib) $(top_builddir)/gmodule/libgmodule.la
|
||||
+libgthread_la_LIBADD = @G_THREAD_LIBS@ $(libglib) $(top_builddir)/gmodule/libgmodule.la
|
||||
|
||||
noinst_PROGRAMS = testgthread
|
||||
-testgthread_LDADD = ../libglib.la libgthread.la
|
||||
+testgthread_LDADD = libgthread.la
|
||||
--- glib-1.2.10/gmodule/Makefile.am.no_undefined 2001-03-15 09:33:10.000000000 -0600
|
||||
+++ glib-1.2.10/gmodule/Makefile.am 2006-05-04 08:33:22.000000000 -0500
|
||||
@@ -27,23 +27,25 @@
|
||||
@G_MODULE_LDFLAGS@ \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
||||
-release $(LT_RELEASE) \
|
||||
+ -no-undefined -Wl,--no-undefined \
|
||||
-export-dynamic
|
||||
|
||||
-libgmodule_la_LIBADD = @G_MODULE_LIBS@ # $(libglib)
|
||||
+libgmodule_la_DEPENDENCIES = $(libglib)
|
||||
+libgmodule_la_LIBADD = @G_MODULE_LIBS@ $(libglib)
|
||||
# we should really depend on $(libglib) for libgmodule.la, but libtool has a
|
||||
# problem with this ;(
|
||||
|
||||
libgplugin_a_la_SOURCES = libgplugin_a.c
|
||||
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
||||
-libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ # $(libglib)
|
||||
+libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ $(libglib)
|
||||
|
||||
libgplugin_b_la_SOURCES = libgplugin_b.c
|
||||
libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
|
||||
-libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ # $(libglib)
|
||||
+libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ $(libglib)
|
||||
|
||||
noinst_PROGRAMS = testgmodule
|
||||
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
|
||||
-testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
|
||||
+testgmodule_LDADD = libgmodule.la @G_MODULE_LIBS@
|
||||
|
||||
.PHONY: files release
|
||||
|
||||
11
glib-1.2.10-underquoted.patch
Normal file
11
glib-1.2.10-underquoted.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- glib-1.2.10/glib.m4.underquoted 2004-08-09 09:10:44.497000620 +0100
|
||||
+++ glib-1.2.10/glib.m4 2004-08-09 09:11:01.446759680 +0100
|
||||
@@ -5,7 +5,7 @@
|
||||
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
|
||||
dnl gthread is specified in MODULES, pass to glib-config
|
||||
dnl
|
||||
-AC_DEFUN(AM_PATH_GLIB,
|
||||
+AC_DEFUN([AM_PATH_GLIB],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the glib-config script
|
||||
dnl
|
||||
13
glib-1.2.10-unused-dep.patch
Normal file
13
glib-1.2.10-unused-dep.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- glib-1.2.10/gthread/Makefile.am 2009-04-17 15:47:42.000000000 +0100
|
||||
+++ glib-1.2.10/gthread/Makefile.am 2009-04-17 15:49:26.000000000 +0100
|
||||
@@ -20,8 +20,8 @@
|
||||
-no-undefined -Wl,--no-undefined \
|
||||
-export-dynamic
|
||||
|
||||
-libgthread_la_DEPENDENCIES = $(libglib) $(top_builddir)/gmodule/libgmodule.la
|
||||
-libgthread_la_LIBADD = @G_THREAD_LIBS@ $(libglib) $(top_builddir)/gmodule/libgmodule.la
|
||||
+libgthread_la_DEPENDENCIES = $(libglib)
|
||||
+libgthread_la_LIBADD = @G_THREAD_LIBS@ $(libglib)
|
||||
|
||||
noinst_PROGRAMS = testgthread
|
||||
testgthread_LDADD = libgthread.la
|
||||
BIN
glib-1.2.10.tar.gz
Normal file
BIN
glib-1.2.10.tar.gz
Normal file
Binary file not shown.
78
glib.spec
Normal file
78
glib.spec
Normal file
@ -0,0 +1,78 @@
|
||||
Name: glib
|
||||
Epoch: 1
|
||||
Version: 1.2.10
|
||||
Release: 54
|
||||
License: LGPLv2+
|
||||
Summary: GLib is the core library that forms the basis for projects
|
||||
URL: http://www.gtk.org/
|
||||
Source: ftp://ftp.gimp.org/pub/gtk/v1.2/glib-%{version}.tar.gz
|
||||
BuildRequires: coreutils libtool make
|
||||
|
||||
Patch0001: glib-1.2.10-isowarning.patch
|
||||
Patch0002: glib-1.2.10-gcc34.patch
|
||||
Patch0003: glib-1.2.10-underquoted.patch
|
||||
Patch0004: glib-1.2.10-no_undefined.patch
|
||||
Patch0005: glib-1.2.10-multilib.patch
|
||||
Patch0006: glib-1.2.10-unused-dep.patch
|
||||
Patch0007: glib-1.2.10-autotools.patch
|
||||
Patch0008: glib-1.2.10-format.patch
|
||||
Patch0009: glib-1.2.10-gcc5.patch
|
||||
|
||||
%description
|
||||
GLib is the low-level core library that forms the basis for projects such
|
||||
as GTK and GNOME. It provides data structure handling for C, portability
|
||||
wrappers, and interfaces for such runtime functionality as an event loop,
|
||||
threads, dynamic loading, and an object system.
|
||||
|
||||
%package devel
|
||||
Summary: Glib development files
|
||||
Requires: glib = %{epoch}:%{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
Libraries and header files for glib development.
|
||||
|
||||
%package help
|
||||
Summary: Help document for the glib package
|
||||
Buildarch: noarch
|
||||
|
||||
%description help
|
||||
Help document for the glib package.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
install -p -m 0644 /usr/lib/rpm/config.guess config.guess
|
||||
install -p -m 0644 /usr/lib/rpm/config.sub config.sub
|
||||
%build
|
||||
%configure LIBTOOL=%{_bindir}/libtool
|
||||
%make_build LIBTOOL=%{_bindir}/libtool
|
||||
%install
|
||||
%make_install LIBTOOL=%{_bindir}/libtool
|
||||
chmod -c a+x %{buildroot}%{_libdir}/lib*.so*
|
||||
%delete_la_and_a
|
||||
%check
|
||||
make check LIBTOOL=%{_bindir}/libtool
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc AUTHORS ChangeLog NEWS README COPYING
|
||||
%{_libdir}/lib*.so.*
|
||||
|
||||
%files devel
|
||||
%{_bindir}/glib-config
|
||||
%{_libdir}/lib*.so
|
||||
%{_libdir}/glib/
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_includedir}/*
|
||||
%{_datadir}/aclocal/*
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/*
|
||||
%exclude %{_infodir}
|
||||
|
||||
%changelog
|
||||
* Wed Nov 27 2019 Ling Yang <lingyang2@huawei.com> - 1:1.2.10-54
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user