From 8e92a6db7889aeb1ba4471245d636d2591a9fd2a Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Fri, 5 Feb 2021 21:36:07 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/libIDL.git#60e1b2a45ce0d63092c235448cee94175566cf74 --- deprecation.patch | 12 -- libIDL-0.8.14-lexer-sscanf-type-punning.patch | 36 ++++ libIDL-0.8.14-long-long-format-warnings.patch | 31 +++ libIDL-0.8.14-old-libIDL-config-script.patch | 116 +++++++++++ ...rser-primary_expr-unused-parent-node.patch | 16 ++ libIDL-config-2.1 | 38 ++++ libIDL.spec | 190 ++++++++++++++---- sources | 2 +- 8 files changed, 384 insertions(+), 57 deletions(-) delete mode 100644 deprecation.patch create mode 100644 libIDL-0.8.14-lexer-sscanf-type-punning.patch create mode 100644 libIDL-0.8.14-long-long-format-warnings.patch create mode 100644 libIDL-0.8.14-old-libIDL-config-script.patch create mode 100644 libIDL-0.8.14-parser-primary_expr-unused-parent-node.patch create mode 100644 libIDL-config-2.1 diff --git a/deprecation.patch b/deprecation.patch deleted file mode 100644 index 006dc4f..0000000 --- a/deprecation.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up libIDL-0.8.9/include/libIDL/IDL.h.in.deprecation libIDL-0.8.9/include/libIDL/IDL.h.in ---- libIDL-0.8.9/include/libIDL/IDL.h.in.deprecation 2008-01-29 02:10:35.000000000 -0500 -+++ libIDL-0.8.9/include/libIDL/IDL.h.in 2008-01-29 02:11:19.000000000 -0500 -@@ -101,7 +101,7 @@ extern "C" { - #define IDL_CHECK_CAST(tree, thetype, name) \ - (IDL_check_type_cast(tree, thetype, \ - __FILE__, __LINE__, \ -- G_GNUC_PRETTY_FUNCTION)->u.name) -+ G_STRFUNC)->u.name) - - /* GLib 2.0 requires 64-bit types */ - #define IDL_LL @IDL_LL@ diff --git a/libIDL-0.8.14-lexer-sscanf-type-punning.patch b/libIDL-0.8.14-lexer-sscanf-type-punning.patch new file mode 100644 index 0000000..c1f906a --- /dev/null +++ b/libIDL-0.8.14-lexer-sscanf-type-punning.patch @@ -0,0 +1,36 @@ +diff -Naur libIDL-0.8.14-original/lexer.l libIDL-0.8.14/lexer.l +--- libIDL-0.8.14-original/lexer.l 2009-04-18 08:20:37.000000000 -0400 ++++ libIDL-0.8.14/lexer.l 2021-02-03 12:56:01.237822569 -0500 +@@ -269,17 +269,29 @@ + <*>{whitespace} ; + {b8_int} { + yylval.integer = 0; +- sscanf (yytext, "%" IDL_LL "o", &yylval.integer); ++ { ++ long long unsigned yyltmp = 0; ++ sscanf (yytext, "%" IDL_LL "o", &yyltmp); ++ memmove (&yylval.integer, &yyltmp, sizeof (yylval.integer)); ++ } + tokreturn (TOK_INTEGER); + } + {b10_uint} { + yylval.integer = 0; +- sscanf (yytext, "%" IDL_LL "u", &yylval.integer); ++ { ++ long long unsigned yyltmp = 0; ++ sscanf (yytext, "%" IDL_LL "u", &yyltmp); ++ memmove (&yylval.integer, &yyltmp, sizeof (yylval.integer)); ++ } + tokreturn (TOK_INTEGER); + } + {b16_int} { + yylval.integer = 0; +- sscanf (yytext + 2, "%" IDL_LL "x", &yylval.integer); ++ { ++ long long unsigned yyltmp = 0; ++ sscanf (yytext + 2, "%" IDL_LL "x", &yyltmp); ++ memmove (&yylval.integer, &yyltmp, sizeof (yylval.integer)); ++ } + tokreturn (TOK_INTEGER); + } + {fixed_lit} { diff --git a/libIDL-0.8.14-long-long-format-warnings.patch b/libIDL-0.8.14-long-long-format-warnings.patch new file mode 100644 index 0000000..22f7b47 --- /dev/null +++ b/libIDL-0.8.14-long-long-format-warnings.patch @@ -0,0 +1,31 @@ +On platforms (such as 64-bit Linux), where long long int and long int are both +64-bit, we can have IDL_LL defined to ll (format with %%lld) while +IDL_longlong_t, which is just gint64, may be ultimately defined to long int. +This results in compiler warnings about the mismatch between the long long +format and long parameter, even though the types are compatible. We can fix +this with a cast to long long before formatting. + +diff -Naur libIDL-0.8.14-original/parser.y libIDL-0.8.14/parser.y +--- libIDL-0.8.14-original/parser.y 2009-04-18 08:20:37.000000000 -0400 ++++ libIDL-0.8.14/parser.y 2021-02-03 12:37:11.067509562 -0500 +@@ -1354,7 +1354,7 @@ + } else if (value < 0) { + yywarningv (IDL_WARNING1, "Cannot use negative value %" + IDL_LL "d, using %" IDL_LL "d", +- value, -value); ++ (long long) value, (long long) -value); + if (ident) + IDL_tree_warning (ident, + IDL_WARNING1, "From constant declared here"); +diff -Naur libIDL-0.8.14-original/util.c libIDL-0.8.14/util.c +--- libIDL-0.8.14-original/util.c 2009-04-18 08:20:37.000000000 -0400 ++++ libIDL-0.8.14/util.c 2021-02-03 12:42:13.641470825 -0500 +@@ -2818,7 +2818,7 @@ + + case IDLN_INTEGER: + /* FIXME: sign */ +- dataf (data, "%" IDL_LL "d", IDL_INTEGER (p).value); ++ dataf (data, "%" IDL_LL "d", (long long) IDL_INTEGER (p).value); + break; + + case IDLN_FIXED: diff --git a/libIDL-0.8.14-old-libIDL-config-script.patch b/libIDL-0.8.14-old-libIDL-config-script.patch new file mode 100644 index 0000000..255a4b3 --- /dev/null +++ b/libIDL-0.8.14-old-libIDL-config-script.patch @@ -0,0 +1,116 @@ +diff -Naur libIDL-0.8.14-original/libIDL-config-2.in libIDL-0.8.14/libIDL-config-2.in +--- libIDL-0.8.14-original/libIDL-config-2.in 2009-04-18 08:20:37.000000000 -0400 ++++ libIDL-0.8.14/libIDL-config-2.in 2021-02-04 08:30:19.646031279 -0500 +@@ -7,7 +7,7 @@ + usage() + { + cat <= $min_libIDL_version) + no_libIDL="" +@@ -89,16 +89,16 @@ + (libIDL_minor_version != $libIDL_config_minor_version) || + (libIDL_micro_version != $libIDL_config_micro_version)) + { +- printf("\n*** 'libIDL-config --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n", ++ printf("\n*** 'libIDL-config-2 --version' returned %d.%d.%d, but libIDL (%d.%d.%d)\n", + $libIDL_config_major_version, $libIDL_config_minor_version, $libIDL_config_micro_version, + libIDL_major_version, libIDL_minor_version, libIDL_micro_version); +- printf ("*** was found! If libIDL-config was correct, then it is best\n"); ++ printf ("*** was found! If libIDL-config-2 was correct, then it is best\n"); + printf ("*** to remove the old version of LIBIDL. You may also be able to fix the error\n"); + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); + printf("*** required on your system.\n"); +- printf("*** If libIDL-config was wrong, set the environment variable LIBIDL_CONFIG\n"); +- printf("*** to point to the correct copy of libIDL-config, and remove the file config.cache\n"); ++ printf("*** If libIDL-config-2 was wrong, set the environment variable LIBIDL_CONFIG\n"); ++ printf("*** to point to the correct copy of libIDL-config-2, and remove the file config.cache\n"); + printf("*** before re-running configure\n"); + } + else if ((libIDL_major_version != LIBIDL_MAJOR_VERSION) || +@@ -126,10 +126,10 @@ + major, minor, micro); + printf("***\n"); + printf("*** If you have already installed a sufficiently new version, this error\n"); +- printf("*** probably means that the wrong copy of the libIDL-config shell script is\n"); ++ printf("*** probably means that the wrong copy of the libIDL-config-2 shell script is\n"); + printf("*** being found. The easiest way to fix this is to remove the old version\n"); + printf("*** of libIDL, but you can also set the LIBIDL_CONFIG environment to point to the\n"); +- printf("*** correct copy of libIDL-config. (In this case, you will have to\n"); ++ printf("*** correct copy of libIDL-config-2. (In this case, you will have to\n"); + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); + printf("*** so that the correct libraries are found at run-time))\n"); + } +@@ -147,10 +147,10 @@ + else + AC_MSG_RESULT(no) + if test "$LIBIDL_CONFIG" = "no" ; then +- echo "*** The libIDL-config script installed by libIDL could not be found" ++ echo "*** The libIDL-config-2 script installed by libIDL could not be found" + echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the LIBIDL_CONFIG environment variable to the" +- echo "*** full path to libIDL-config." ++ echo "*** full path to libIDL-config-2." + else + if test -f conf.libIDLtest ; then + : +@@ -175,7 +175,7 @@ + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means libIDL was incorrectly installed" + echo "*** or that you have moved libIDL since it was installed. In the latter case, you" +- echo "*** may want to edit the libIDL-config script: $LIBIDL_CONFIG" ]) ++ echo "*** may want to edit the libIDL-config-2 script: $LIBIDL_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi +diff -Naur libIDL-0.8.14-original/tstidl.c libIDL-0.8.14/tstidl.c +--- libIDL-0.8.14-original/tstidl.c 2021-02-04 08:31:53.168637254 -0500 ++++ libIDL-0.8.14/tstidl.c 2021-02-04 08:32:10.342748532 -0500 +@@ -6,7 +6,7 @@ + * + * if given, flags is read as (output_flags << 24) | parse_flags + * +- * gcc `libIDL-config --cflags --libs` tstidl.c -o tstidl ++ * gcc `libIDL-config-2 --cflags --libs` tstidl.c -o tstidl + * + */ + #ifdef G_LOG_DOMAIN diff --git a/libIDL-0.8.14-parser-primary_expr-unused-parent-node.patch b/libIDL-0.8.14-parser-primary_expr-unused-parent-node.patch new file mode 100644 index 0000000..057af40 --- /dev/null +++ b/libIDL-0.8.14-parser-primary_expr-unused-parent-node.patch @@ -0,0 +1,16 @@ +diff -Naur libIDL-0.8.14-original/parser.y libIDL-0.8.14/parser.y +--- libIDL-0.8.14-original/parser.y 2009-04-18 08:20:37.000000000 -0400 ++++ libIDL-0.8.14/parser.y 2021-02-03 12:44:47.638466666 -0500 +@@ -898,11 +898,9 @@ + ; + + primary_expr: scoped_name { +- IDL_tree p, literal; ++ IDL_tree literal; + + assert (IDL_NODE_TYPE ($1) == IDLN_IDENT); +- +- p = IDL_NODE_UP ($1); + + if ((literal = IDL_resolve_const_exp ($1, IDLN_ANY))) { + ++IDL_NODE_REFS (literal); diff --git a/libIDL-config-2.1 b/libIDL-config-2.1 new file mode 100644 index 0000000..8037bc2 --- /dev/null +++ b/libIDL-config-2.1 @@ -0,0 +1,38 @@ +.TH LIBIDL\-CONFIG\-2 "1" "February 2021" "" "User Commands" +.SH NAME +libIDL\-config\-2 \- prints information about a libIDL installation +.SH SYNOPSIS +.B libIDL\-config\-2 +.RB [ OPTIONS \ ...] +.SH DESCRIPTION +This program is mostly for use in build scripts. +Please consider using +.BR pkg\-config (1) +or +.BR pkgconf (1) +instead. +.SH OPTIONS +.TP +.BR \-\-prefix [=\fIDIR\fR] +Print the prefix for host-independent files for libIDL, e.g. \fB/usr\fR. +.TP +.BR \-\-exec\-prefix [=\fIDIR\fR] +Print the prefix for host-dependent files for libIDL, e.g. \fB/usr\fR. +.TP +.B \-\-version +Display the version of libIDL and exit. +.TP +.B \-\-libs +Display all linker flags: +.BR \-L , +.BR \-l , +and otherwise. +.TP +.B \-\-cflags +Display all +.BR CFLAGS : +.BR \-I , +and otherwise. +.SH "SEE\ ALSO" +.BR pkgconf (1), +.BR pkg\-config (1) diff --git a/libIDL.spec b/libIDL.spec index 25239f4..f374f7a 100644 --- a/libIDL.spec +++ b/libIDL.spec @@ -1,64 +1,167 @@ -Summary: Library for parsing IDL (Interface Definition Language) -Name: libIDL -Version: 0.8.14 -Release: 23%{?dist} -URL: http://ftp.gnome.org/pub/gnome/sources/libIDL/0.8/ -Source: http://download.gnome.org/sources/libIDL/0.8/%{name}-%{version}.tar.bz2 -Patch0: libIDL-0.8.6-multilib.patch -License: LGPLv2+ -BuildRequires: gcc -BuildRequires: pkgconfig >= 0.8 -BuildRequires: glib2-devel >= 2.0 -BuildRequires: flex bison -BuildRequires: make +Name: libIDL +Summary: Library for parsing IDL (Interface Definition Language) +Version: 0.8.14 +%global so_version 0 +Release: 24%{?dist} + +%global minorversion %(echo '%{version}' | cut -d . -f 1-2) +URL: https://download.gnome.org/sources/%{name}/%{minorversion}/ +Source0: %{url}/%{name}-%{version}.tar.bz2 +# Hand-written man page: +Source1: %{name}-config-2.1 +License: LGPLv2+ + +# Note that upstream is dead; GNOME still offers just a download page, and the +# VCS was migrated to https://gitlab.gnome.org/Archive/libidl, but the project +# is archived and therefore no bug tracker is offered. An old email address for +# the ORBIT development mailing list is offered in the HACKING file, but the +# archived status of the project shows that nothing will be done with patches. +# contact is available. Any patches below will therefore not be sent upstream, +# because there is nowhere for them to go. +# +# Normally this would be the time to re-evaluate whether the package still +# belongs in Fedora, but ORBit2 still requires it, and at least libgnome and +# libbonobo require that, so it is in the dependency chain of a great many +# packages. + +# Fix paths reported by the libIDL-config-2 tool to conform with Fedora +# multilib installation paths: +Patch0: %{name}-0.8.6-multilib.patch +# Remove an unused parent-node variable in the primary_expr part of the parser, +# which caused a compiler warning. +Patch1: %{name}-0.8.14-parser-primary_expr-unused-parent-node.patch +# On platforms (such as 64-bit Linux), where long long int and long int are +# both 64-bit, we can have IDL_LL defined to ll (format with %%lld) while +# IDL_longlong_t, which is just gint64, may be ultimately defined to long int. +# This results in compiler warnings about the mismatch between the long long +# format and long parameter, even though the types are compatible. We can fix +# this with a cast to (long long) before formatting. +Patch2: %{name}-0.8.14-long-long-format-warnings.patch +# Instead of type-punning with sscanf, parse into a temporary with a type +# matching the format code and then memmove into the “integer” storage. This is +# no less platform-dependent, but does not invoke undefined behavior or produce +# a compiler warning. +Patch3: %{name}-0.8.14-lexer-sscanf-type-punning.patch +# Fix references to the old libIDL-config script by changing them to +# libIDL-config-2. +Patch4: %{name}-0.8.14-old-libIDL-config-script.patch + +BuildRequires: gcc +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: glib2-devel +BuildRequires: flex +BuildRequires: bison + +BuildRequires: texinfo +BuildRequires: texinfo-tex +BuildRequires: tex(latex) + +%global common_description %{expand: +%{name} is a library for parsing IDL (Interface Definition Language). It can be +used for both COM-style and CORBA-style IDL.} + +%description %{common_description} -%description -libIDL is a library for parsing IDL (Interface Definition Language). -It can be used for both COM-style and CORBA-style IDL. %package devel -Summary: Development libraries and header files for libIDL -Requires: %{name} = %{version}-%{release} -Requires: pkgconfig >= 1:0.8 -Requires: glib2-devel >= 2.0 +Summary: Development libraries and header files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig +Requires: glib2-devel%{?_isa} -%description devel -libIDL is a library for parsing IDL (Interface Definition Language). -It can be used for both COM-style and CORBA-style IDL. +%description devel %{common_description} + +This package contains the header files and libraries needed to write or compile +programs that use %{name}. + + +%package doc +Summary: Documentation for %{name} +BuildArch: noarch + +%description doc %{common_description} + +This page contains info pages and HTML and PDF documentation for %{name}. -This package contains the header files and libraries needed to write -or compile programs that use libIDL. %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 -b .multilib +%autosetup -p1 + %build -%configure -make %{?_smp_mflags} +%configure --disable-static +# We re-generate the info page, and also build PDF and HTML docs from the +# texinfo source. +rm %{name}2.info +%make_build all %{name}2.info %{name}2.html %{name}2.pdf + %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT +%make_install +rm '%{buildroot}%{_libdir}/%{name}-2.la' +rm '%{buildroot}%{_infodir}/dir' +install -t '%{buildroot}%{_pkgdocdir}' -D -p -m 0644 \ + AUTHORS \ + BUGS \ + ChangeLog \ + HACKING \ + MAINTAINERS \ + NEWS \ + README \ + %{name}2.pdf +cp -rp '%{name}2.html' '%{buildroot}%{_pkgdocdir}/html' +install -t '%{buildroot}%{_datadir}/aclocal/%{name}.m4' -D -p -m 0644 \ + %{name}.m4 +install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE1}' -rm -f $RPM_BUILD_ROOT%{_infodir}/dir -rm -f $RPM_BUILD_ROOT%{_libdir}/*a - -%ldconfig_scriptlets %files -%{_libdir}/libIDL-*.so.* +%license COPYING + +%{_libdir}/%{name}-2.so.%{so_version} +%{_libdir}/%{name}-2.so.%{so_version}.* -%doc AUTHORS COPYING README NEWS BUGS MAINTAINERS %files devel -%{_includedir}/libIDL-2.0/ -%{_libdir}/libIDL-*.so -%{_libdir}/pkgconfig/libIDL-*.pc -%{_bindir}/libIDL-config-2 -%{_infodir}/libIDL2.info.* +%{_libdir}/%{name}-2.so + +%{_includedir}/%{name}-2.0/ + +%{_libdir}/pkgconfig/%{name}-2.0.pc +# Note the aclocal directory is provided by the “filesystem” package +%{_datadir}/aclocal/%{name}.m4 +%{_bindir}/%{name}-config-2 +%{_mandir}/man1/%{name}-config-2.1* + + +%files doc +%license COPYING + +%{_infodir}/%{name}2.info* + +%{_pkgdocdir} + %changelog +* Wed Feb 03 2021 Benjamin A. Beasley - 0.8.14-24 +- Rearrange whitespace +- Use HTTPS URLs +- Make glib2-devel dependency from -devel subpackage arch-specific +- Use %%autosetup, %%make_build, and %%make_install macros +- Rather than removing the static library, skip building it with --disable-static +- Drop obsolete %%ldconfig_scriptlets macro +- Use much stricter path globs +- Use %%name macro +- Add well-considered patches for all compiler warnings +- Drop explicitly versioned dependencies per Fedora guidelines +- Build HTML and PDF versions of documentation; rebuld the info pages; and move + it all to a -doc subpackage with the text file documentation (README, etc.) +- Properly install the license (COPYING) file +- Patch references to the old libIDL-config, which went away in the year 2002 +- Install the m4 script for Autoconf as part of the -devel package +- Add a man page for the libIDL-config-2 script + * Tue Jan 26 2021 Fedora Release Engineering - 0.8.14-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild @@ -193,8 +296,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*a - rebuilt * Mon Nov 7 2005 Matthias Clasen 0.8.6-2 -- Remove .la files and static libraries from the - -devel package +- Remove .la files and static libraries from the -devel package * Wed Sep 7 2005 Matthias Clasen 0.8.6-1 - Update to 0.8.6 diff --git a/sources b/sources index c7e3363..ab0d0cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bb8e10a218fac793a52d404d14adedcb libIDL-0.8.14.tar.bz2 +SHA512 (libIDL-0.8.14.tar.bz2) = 906dde087908acd64b209fe466a89ae52a6ea23601cb30092063a6e062b1b6640fc2d5f422efcdd52b2b36ce20e6c244da6205fde0bdcec787fe64058be7adac