Rebase for expat 2.1.1 46/75446/1
authorAnas Nashif <anas.nashif@intel.com>
Sun, 4 Nov 2012 23:54:57 +0000 (15:54 -0800)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 20 Jun 2016 00:36:09 +0000 (09:36 +0900)
Change-Id: I43b7384b06cb2ce7d0f3afe3b4b9a91d893abac4
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Makefile.in
configure.ac
lib/expat.h
lib/expat_external.h
packaging/baselibs.conf [new file with mode: 0644]
packaging/expat.changes [new file with mode: 0644]
packaging/expat.manifest [new file with mode: 0644]
packaging/expat.spec [new file with mode: 0644]

index 6863b09..1a84916 100644 (file)
@@ -114,11 +114,12 @@ CPPFLAGS = @CPPFLAGS@ -DHAVE_EXPAT_CONFIG_H
 CFLAGS = @CFLAGS@
 CXXFLAGS = @CXXFLAGS@
 VSNFLAG = -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
+CFLAG_VISIBILITY=@CFLAG_VISIBILITY@
 
 ### autoconf this?
 LTFLAGS = --verbose
 
-COMPILE = $(CC) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
+COMPILE = $(CC) $(CLFAG_VISIBILITY) $(INCLUDES) $(CFLAGS) $(DEFS) $(CPPFLAGS)
 CXXCOMPILE = $(CXX) $(INCLUDES) $(CXXFLAGS) $(DEFS) $(CPPFLAGS)
 LTCOMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE)
 LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG) -rpath $(libdir) $(LDFLAGS) -o $@
index 7e968c4..8b24103 100644 (file)
@@ -53,15 +53,19 @@ AC_CONFIG_HEADER(expat_config.h)
 
 sinclude(conftools/ac_c_bigendian_cross.m4)
 
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+sinclude(conftools/visibility.m4)
 
 AC_SUBST(LIBCURRENT)
 AC_SUBST(LIBREVISION)
 AC_SUBST(LIBAGE)
 
 dnl Checks for programs.
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+gl_VISIBILITY
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
 AC_PROG_CXX
 AC_PROG_INSTALL
 
index ec62f14..cc08d0a 100644 (file)
@@ -973,9 +973,13 @@ XML_FreeContentModel(XML_Parser parser, XML_Content *model);
 
 /* Exposing the memory handling functions used in Expat */
 XMLPARSEAPI(void *)
+XML_ATTR_MALLOC
+XML_ATTR_ALLOC_SIZE(2)
 XML_MemMalloc(XML_Parser parser, size_t size);
 
 XMLPARSEAPI(void *)
+XML_ATTR_MALLOC
+XML_ATTR_ALLOC_SIZE(3)
 XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
 
 XMLPARSEAPI(void)
index 2c03284..7118e9c 100644 (file)
 #endif
 #endif  /* not defined XML_STATIC */
 
+#if HAVE_VISIBILTY
+#define XMLIMPORT __attribute__ ((visibility ("default")))
+#endif
 
 /* If we didn't define it above, define it away: */
 #ifndef XMLIMPORT
 #define XMLIMPORT
 #endif
 
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
+#define XML_ATTR_MALLOC __attribute__((__malloc__))
+#else
+#define XML_ATTR_MALLOC
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+#define XML_ATTR_ALLOC_SIZE(x)  __attribute__((__alloc_size__(x)))
+#else
+#define XML_ATTR_ALLOC_SIZE(x)
+#endif
 
 #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
 
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..7a3ab03
--- /dev/null
@@ -0,0 +1,6 @@
+expat
+libexpat
+  obsoletes "expat-<targettype>"
+  provides  "expat-<targettype>"
+libexpat-devel
+  requires "libexpat-<targettype> = <version>"
diff --git a/packaging/expat.changes b/packaging/expat.changes
new file mode 100644 (file)
index 0000000..fd11904
--- /dev/null
@@ -0,0 +1,6 @@
+* Sun Mar 17 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20121214.213327@5799e55
+- Update package groups
+
+* Fri Dec 14 2012 Anas Nashif <anas.nashif@intel.com> upstream/2.1.0@5854ad9
+- initial checkin
+
diff --git a/packaging/expat.manifest b/packaging/expat.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/expat.spec b/packaging/expat.spec
new file mode 100644 (file)
index 0000000..ea6ec23
--- /dev/null
@@ -0,0 +1,134 @@
+Name:           expat
+Version:        2.1.0
+Release:        0
+Url:            http://expat.sourceforge.net/
+Summary:        XML Parser Toolkit
+License:        MIT
+Group:          System/Libraries
+Source0:        %{name}-%{version}.tar.gz
+Source1:        baselibs.conf
+Source1001:    expat.manifest
+BuildRequires:  gcc-c++
+BuildRequires:  libtool
+BuildRequires:  pkg-config
+
+%description
+Expat is an XML 1.0 parser written in C. It aims to be fully
+conformant. It is currently not a validating XML processor. The current
+production version of expat can be downloaded from
+ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
+low-level library for tokenizing XML. The interface is documented in
+xmltok/xmltok.h. The directory xmlparse contains an XML parser library
+that is built on top of the xmltok library. The interface is documented
+in xmlparse/xmlparse.h. The directory sample contains a simple example
+program using this interface. The file sample/build.bat is a batch
+file to build the example using Visual C++. The directory xmlwf
+contains the xmlwf application, which uses the xmlparse library. The
+arguments to xmlwf are one or more files to check for well-formedness.
+An option -d dir can be specified. For each well-formed input file, the
+corresponding canonical XML is written to dir/f, where f is the
+filename (without any path) of the input file. A -x option causes
+references to external general entities to be processed. A -s option
+makes documents that are not stand-alone cause an error (a document is
+considered stand-alone if it is intrinsically stand-alone because it
+has no external subset and no references to parameter entities in the
+internal subset or it is declared as stand-alone in the XML
+declaration).
+
+%package -n libexpat
+Summary:        XML Parser Toolkit
+Group:          System/Libraries
+
+%description -n libexpat
+Expat is an XML 1.0 parser written in C. It aims to be fully
+conformant. It is currently not a validating XML processor. The current
+production version of expat can be downloaded from
+ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
+low-level library for tokenizing XML. The interface is documented in
+xmltok/xmltok.h. The directory xmlparse contains an XML parser library
+that is built on top of the xmltok library. The interface is documented
+in xmlparse/xmlparse.h. The directory sample contains a simple example
+program using this interface. The file sample/build.bat is a batch
+file to build the example using Visual C++. The directory xmlwf
+contains the xmlwf application, which uses the xmlparse library. The
+arguments to xmlwf are one or more files to check for well-formedness.
+An option -d dir can be specified. For each well-formed input file, the
+corresponding canonical XML is written to dir/f, where f is the
+filename (without any path) of the input file. A -x option causes
+references to external general entities to be processed. A -s option
+makes documents that are not stand-alone cause an error (a document is
+considered stand-alone if it is intrinsically stand-alone because it
+has no external subset and no references to parameter entities in the
+internal subset or it is declared as stand-alone in the XML
+declaration).
+
+%package -n libexpat-devel
+Summary:        XML Parser Toolkit
+Group:          Development/Libraries
+Requires:       glibc-devel
+Requires:       libexpat = %{version}
+Provides:      expat-devel
+
+%description -n libexpat-devel
+Expat is an XML 1.0 parser written in C. It aims to be fully
+conformant. It is currently not a validating XML processor. The current
+production version of expat can be downloaded from
+ftp://ftp.jclark.com/pub/xml/expat.zip. The directory xmltok contains a
+low-level library for tokenizing XML. The interface is documented in
+xmltok/xmltok.h. The directory xmlparse contains an XML parser library
+that is built on top of the xmltok library. The interface is documented
+in xmlparse/xmlparse.h. The directory sample contains a simple example
+program using this interface. The file sample/build.bat is a batch
+file to build the example using Visual C++. The directory xmlwf
+contains the xmlwf application, which uses the xmlparse library. The
+arguments to xmlwf are one or more files to check for well-formedness.
+An option -d dir can be specified. For each well-formed input file, the
+corresponding canonical XML is written to dir/f, where f is the
+filename (without any path) of the input file. A -x option causes
+references to external general entities to be processed. A -s option
+makes documents that are not stand-alone cause an error (a document is
+considered stand-alone if it is intrinsically stand-alone because it
+has no external subset and no references to parameter entities in the
+internal subset or it is declared as stand-alone in the XML
+declaration).
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+rm -f examples/*.dsp
+
+%build
+%reconfigure --disable-static --with-pic
+make %{?_smp_mflags}
+
+%check
+make check
+
+%install
+%make_install
+rm doc/xmlwf.1
+
+%post -n libexpat -p /sbin/ldconfig
+
+%postun -n libexpat -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%license COPYING
+%doc %{_mandir}/man?/*
+%{_bindir}/xmlwf
+
+%files -n libexpat
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_libdir}/libexpat.so.*
+
+%files -n libexpat-devel
+%manifest %{name}.manifest
+%defattr(-, root, root)
+%{_includedir}/*
+%{_libdir}/libexpat.so
+%{_libdir}/pkgconfig/expat.pc
+
+%changelog