aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2008-11-19 20:10:08 +0100
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2008-11-20 14:18:25 +0100
commited4e4ff949cabca33c020c2f11c74cc9575fe9ab (patch)
treecfd251a2d9782b84482c9953d31bddab9ea86ea2
parent3ad80da39c3601d21bca2cc22f095efd9a3a5401 (diff)
downloadpaludis-ed4e4ff949cabca33c020c2f11c74cc9575fe9ab.tar.gz
paludis-ed4e4ff949cabca33c020c2f11c74cc9575fe9ab.tar.xz
Replace '--enable-glsa --enable-metadata-xml' by '--enable-xml'.
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac38
-rw-r--r--paludis/repositories/e/Makefile.am8
-rw-r--r--paludis/repositories/e/e_repository_sets_TEST.cc2
-rw-r--r--paludis/repositories/e/glsa.cc2
-rw-r--r--paludis/repositories/e/xml_things.cc8
-rw-r--r--paludis/repositories/e/xml_things.hh4
-rw-r--r--paludis/repositories/e/xml_things_handle.cc10
8 files changed, 21 insertions, 55 deletions
diff --git a/Makefile.am b/Makefile.am
index 532eea1..4ba9675 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,8 +6,8 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip std-options foreign
EXTRA_DIST = autogen.bash automake-deps-dist-hack.tmp
SUBDIRS = misc test paludis python ruby src doc hooks vim bash-completion zsh-completion pkg-config
-DISTCHECK_CONFIGURE_FLAGS = --enable-qa --enable-ruby --enable-ruby-doc --enable-glsa --enable-vim \
- --enable-python --enable-python-doc --enable-metadata-xml \
+DISTCHECK_CONFIGURE_FLAGS = --enable-qa --enable-ruby --enable-ruby-doc --enable-vim \
+ --enable-python --enable-python-doc --enable-xml \
--with-ruby-install-dir='$${DESTDIR}$${prefix}/ruby_dir' \
--with-repositories=default \
--with-environments=default,portage \
diff --git a/configure.ac b/configure.ac
index 877ac96..558db1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -879,36 +879,20 @@ AC_SUBST([ENABLE_QA])
AM_CONDITIONAL([ENABLE_QA], test "x$ENABLE_QA" = "xyes")
dnl }}}
-dnl {{{ check for whether to build glsa stuff
-AC_MSG_CHECKING([whether to build GLSA support])
-AC_ARG_ENABLE([glsa],
- AS_HELP_STRING([--enable-glsa], [Build GLSA things (needs libxml2)]),
- [ENABLE_GLSA=$enableval
+dnl {{{ check for whether to build xml stuff
+AC_MSG_CHECKING([whether to build xml things for metadata.xml and GLSA support])
+AC_ARG_ENABLE([xml],
+ AS_HELP_STRING([--enable-xml], [Build xml things for metadata.xml and GLSA support (needs libxml2)]),
+ [ENABLE_XML=$enableval
AC_MSG_RESULT([$enableval])],
- [ENABLE_GLSA=no
+ [ENABLE_XML=no
AC_MSG_RESULT([no])])
-if test x"$ENABLE_GLSA" = "xyes" ; then
+if test x"$ENABLE_XML" = "xyes" ; then
need_xml_check=yes
- AC_DEFINE([ENABLE_GLSA], [1], [Build GLSA support])
+ AC_DEFINE([ENABLE_XML], [1], [Build xml support])
fi
-AC_SUBST([ENABLE_GLSA])
-AM_CONDITIONAL([ENABLE_GLSA], test "x$ENABLE_GLSA" = "xyes")
-dnl }}}
-
-dnl {{{ check for whether to build metadata.xml stuff
-AC_MSG_CHECKING([whether to build metadata.xml support])
-AC_ARG_ENABLE([metadata-xml],
- AS_HELP_STRING([--enable-metadata-xml], [Build metadata.xml things (needs libxml2)]),
- [ENABLE_METADATA_XML=$enableval
- AC_MSG_RESULT([$enableval])],
- [ENABLE_METADATA_XML=no
- AC_MSG_RESULT([no])])
-if test x"$ENABLE_METADATA_XML" = "xyes" ; then
- need_xml_check=yes
- AC_DEFINE([ENABLE_METADATA_XML], [1], [Build metadata.xml support])
-fi
-AC_SUBST([ENABLE_METADATA_XML])
-AM_CONDITIONAL([ENABLE_METADATA_XML], test "x$ENABLE_METADATA_XML" = "xyes")
+AC_SUBST([ENABLE_XML])
+AM_CONDITIONAL([ENABLE_XML], test "x$ENABLE_XML" = "xyes")
dnl }}}
dnl {{{ colourschemes
@@ -1381,7 +1365,7 @@ dnl {{{ libxml2 check
NEED_XML=$need_xml_check
if test "x$need_xml_check" = "xyes" ; then
PKG_CHECK_MODULES(LIBXML2DEPS, [libxml-2.0 >= 2.6], [],
- [AC_MSG_ERROR([libxml2 (http://xmlsoft.org/) is required if --enable-metadata-xml or --enable-glsa is used])])
+ [AC_MSG_ERROR([libxml2 (http://xmlsoft.org/) is required if --enable-xml is used])])
AC_SUBST(LIBXML2DEPS_CFLAGS)
AC_SUBST(LIBXML2DEPS_LIBS)
fi
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index 40f2985..98d2330 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -22,12 +22,8 @@ DEFS= \
paludis_repositories_libdir = $(libdir)/paludis/repositories
paludis_repositories_lib_LTLIBRARIES = libpaludiserepository_@PALUDIS_PC_SLOT@.la
-if ENABLE_GLSA
+if ENABLE_XML
lib_LTLIBRARIES = libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@.la
-else
-if ENABLE_METADATA_XML
-lib_LTLIBRARIES = libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@.la
-endif
endif
paludis_repositories_e_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/e/
@@ -506,7 +502,7 @@ libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@_la_LIBADD = \
libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-if ENABLE_GLSA
+if ENABLE_XML
GLSA_TESTS = xml_things_TEST
xml_things_TEST_SOURCES = xml_things_TEST.cc
diff --git a/paludis/repositories/e/e_repository_sets_TEST.cc b/paludis/repositories/e/e_repository_sets_TEST.cc
index d94002d..0924b92 100644
--- a/paludis/repositories/e/e_repository_sets_TEST.cc
+++ b/paludis/repositories/e/e_repository_sets_TEST.cc
@@ -100,7 +100,7 @@ namespace test_cases
}
} test_e_repository_sets_maintainer_defined_sets_list;
-#if ENABLE_GLSA
+#if ENABLE_XML
struct ERepositorySetsInsecuritySetTest : TestCase
{
ERepositorySetsInsecuritySetTest() : TestCase("insecurity set") { }
diff --git a/paludis/repositories/e/glsa.cc b/paludis/repositories/e/glsa.cc
index e40b6e8..709ebfe 100644
--- a/paludis/repositories/e/glsa.cc
+++ b/paludis/repositories/e/glsa.cc
@@ -188,7 +188,7 @@ GLSA::create_from_xml_file(const std::string & filename)
{
if (! erepository::XMLThingsHandle::get_instance()->create_glsa_from_xml_file())
{
-#ifdef ENABLE_GLSA
+#ifdef ENABLE_XML
throw NotAvailableError("Cannot create GLSA from XML file '" + filename + "' because your XML libraries are unusable");
#else
throw NotAvailableError("Cannot create GLSA from XML file '" + filename + "' because GLSA support was not enabled at compile time");
diff --git a/paludis/repositories/e/xml_things.cc b/paludis/repositories/e/xml_things.cc
index 8b1dcae..18ae6e3 100644
--- a/paludis/repositories/e/xml_things.cc
+++ b/paludis/repositories/e/xml_things.cc
@@ -119,7 +119,7 @@ namespace
return std::tr1::shared_ptr<T_>(p, d);
}
-#ifdef ENABLE_GLSA
+#ifdef ENABLE_XML
class GLSAHandler
{
private:
@@ -259,7 +259,7 @@ namespace
}
-#ifdef ENABLE_GLSA
+#ifdef ENABLE_XML
std::tr1::shared_ptr<GLSA>
paludis_xml_things_create_glsa_from_xml_file(const std::string & filename)
@@ -278,10 +278,6 @@ paludis_xml_things_create_glsa_from_xml_file(const std::string & filename)
}
}
-#endif
-
-#ifdef ENABLE_METADATA_XML
-
std::tr1::shared_ptr<erepository::MetadataXML>
paludis_xml_things_create_metadata_xml_from_xml_file(const FSEntry & filename)
{
diff --git a/paludis/repositories/e/xml_things.hh b/paludis/repositories/e/xml_things.hh
index 50ee0b2..de61022 100644
--- a/paludis/repositories/e/xml_things.hh
+++ b/paludis/repositories/e/xml_things.hh
@@ -30,11 +30,9 @@ extern "C"
void paludis_xml_things_init() PALUDIS_VISIBLE;
void paludis_xml_things_cleanup() PALUDIS_VISIBLE;
-#if ENABLE_GLSA
+#if ENABLE_XML
std::tr1::shared_ptr<paludis::GLSA> PALUDIS_VISIBLE paludis_xml_things_create_glsa_from_xml_file(const std::string &);
-#endif
-#if ENABLE_METADATA_XML
std::tr1::shared_ptr<paludis::erepository::MetadataXML> PALUDIS_VISIBLE paludis_xml_things_create_metadata_xml_from_xml_file(
const paludis::FSEntry &) PALUDIS_ATTRIBUTE((warn_unused_result));
#endif
diff --git a/paludis/repositories/e/xml_things_handle.cc b/paludis/repositories/e/xml_things_handle.cc
index af64947..c0a392c 100644
--- a/paludis/repositories/e/xml_things_handle.cc
+++ b/paludis/repositories/e/xml_things_handle.cc
@@ -54,7 +54,7 @@ namespace paludis
init(0),
cleanup(0)
{
-#if defined(ENABLE_GLSA) || defined(ENABLE_METADATA_XML)
+#if ENABLE_XML
handle = ::dlopen(("libpaludiserepositoryxmlthings_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
if (! handle)
{
@@ -79,7 +79,6 @@ namespace paludis
return;
}
-# ifdef ENABLE_GLSA
XMLThingsHandle::CreateGLSAFromXMLFilePtr g(STUPID_CAST(XMLThingsHandle::CreateGLSAFromXMLFilePtr,
::dlsym(handle, "paludis_xml_things_create_glsa_from_xml_file")));
if (! g)
@@ -88,9 +87,7 @@ namespace paludis
<< ::dlerror() << "' from dlsym for GLSA things";
return;
}
-# endif
-# ifdef ENABLE_METADATA_XML
XMLThingsHandle::CreateMetadataXMLFromXMLFilePtr x(STUPID_CAST(XMLThingsHandle::CreateMetadataXMLFromXMLFilePtr,
::dlsym(handle, "paludis_xml_things_create_metadata_xml_from_xml_file")));
if (! x)
@@ -99,16 +96,11 @@ namespace paludis
<< ::dlerror() << "' from dlsym for metadata.xml things";
return;
}
-# endif
init = i;
cleanup = c;
-# ifdef ENABLE_GLSA
create_glsa_from_xml_file = g;
-# endif
-# ifdef ENABLE_METADATA_XML
create_metadata_xml_from_xml_file = x;
-# endif
init();
#endif