aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-13 15:47:23 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-13 15:47:23 +0100
commit2ce428add61463e110c195bb9f12c5080f4fee7a (patch)
tree912649cec61d1e5e32ae44c747e404c88ffbcd41
parent5355d539ddad92f2289f4f78508ca0cd32db14a2 (diff)
parent4a1b4aef7c9aee2b936a27f9b1d86a9ae7b36b06 (diff)
downloadpaludis-2ce428add61463e110c195bb9f12c5080f4fee7a.tar.gz
paludis-2ce428add61463e110c195bb9f12c5080f4fee7a.tar.xz
Merge remote branch 'snowmobile/no-plugins'
-rw-r--r--configure.ac64
-rw-r--r--paludis/Makefile.am.m441
-rw-r--r--paludis/environment_factory.cc63
-rw-r--r--paludis/environment_factory.hh8
-rw-r--r--paludis/environments/no_config/Makefile.am12
-rw-r--r--paludis/environments/no_config/registration.cc24
-rw-r--r--paludis/environments/paludis/Makefile.am26
-rw-r--r--paludis/environments/paludis/registration.cc22
-rw-r--r--paludis/environments/portage/Makefile.am16
-rw-r--r--paludis/environments/portage/registration.cc22
-rw-r--r--paludis/environments/test/Makefile.am23
-rw-r--r--paludis/environments/test/registration.cc16
-rw-r--r--paludis/repositories/accounts/Makefile.am19
-rw-r--r--paludis/repositories/accounts/registration.cc48
-rw-r--r--paludis/repositories/cran/Makefile.am33
-rw-r--r--paludis/repositories/cran/registration.cc54
-rw-r--r--paludis/repositories/e/Makefile.am73
-rw-r--r--paludis/repositories/e/qa/Makefile.am59
-rw-r--r--paludis/repositories/e/qa/qa.cc20
-rw-r--r--paludis/repositories/e/qa/stray_files_TEST.cc40
-rw-r--r--paludis/repositories/e/registration.cc72
-rw-r--r--paludis/repositories/e/xml_things.cc6
-rw-r--r--paludis/repositories/fake/Makefile.am18
-rw-r--r--paludis/repositories/fake/registration.cc37
-rw-r--r--paludis/repositories/gems/Makefile.am26
-rw-r--r--paludis/repositories/gems/registration.cc54
-rw-r--r--paludis/repositories/unavailable/Makefile.am20
-rw-r--r--paludis/repositories/unavailable/registration.cc34
-rw-r--r--paludis/repositories/unpackaged/Makefile.am23
-rw-r--r--paludis/repositories/unpackaged/registration.cc54
-rw-r--r--paludis/repositories/unwritten/Makefile.am19
-rw-r--r--paludis/repositories/unwritten/registration.cc34
-rw-r--r--paludis/repositories/virtuals/Makefile.am34
-rw-r--r--paludis/repositories/virtuals/registration.cc54
-rw-r--r--paludis/repository_factory-fwd.hh2
-rw-r--r--paludis/repository_factory.cc68
-rw-r--r--paludis/repository_factory.hh6
-rw-r--r--paludis/resolver/Makefile.am8
-rw-r--r--python/Makefile.am7
-rw-r--r--ruby/Makefile.am4
-rw-r--r--src/clients/accerso/Makefile.am1
-rw-r--r--src/clients/adjutrix/Makefile.am2
-rw-r--r--src/clients/appareo/Makefile.am1
-rw-r--r--src/clients/instruo/Makefile.am1
-rw-r--r--src/clients/qualudis/Makefile.am1
45 files changed, 511 insertions, 758 deletions
diff --git a/configure.ac b/configure.ac
index 5df7fe9..3224c8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1284,7 +1284,8 @@ AC_SUBST([VIM_INSTALL_DIR])
dnl }}}
dnl {{{ repositories
-ALL_REPOSITORIES="accounts cran e fake gems unavailable unpackaged unwritten virtuals"
+m4_define(ALL_REPOSITORIES_m4, [accounts,cran,e,fake,gems,unavailable,unpackaged,unwritten,virtuals])
+ALL_REPOSITORIES=`echo ALL_REPOSITORIES_m4 | tr , ' '`
DEFAULT_REPOSITORIES="e fake unavailable unpackaged unwritten virtuals"
AC_MSG_CHECKING([which repositories to build...])
AC_ARG_WITH([repositories],
@@ -1319,21 +1320,36 @@ for r in e fake ; do
fi
done
-enable_virtuals_repository=
-if echo $repositories | tr ' ' '\n' | grep '^virtuals$' >/dev/null ; then
- AC_DEFINE_UNQUOTED([ENABLE_VIRTUALS_REPOSITORY], [1], [Enable virtuals repository])
- enable_virtuals_repository=yes
+AC_DEFUN([REPOSITORY_GROUP_IF], [
+enable_$1_repository=
+if echo $repositories | tr ' ' '\n' | grep '^$1$' >/dev/null ; then
+ enable_$1_repository=yes
+ AC_DEFINE_UNQUOTED([REPOSITORY_GROUP_IF_$1], [$1], [The $1 repository])
+ AC_DEFINE_UNQUOTED(ENABLE_[]m4_translit($1, [a-z], [A-Z])_REPOSITORY, [1], [Enable $1 repository])
+else
+ AC_DEFINE_UNQUOTED([REPOSITORY_GROUP_IF_$1], [], [Do not have the $1 repository])
fi
-AM_CONDITIONAL([ENABLE_VIRTUALS_REPOSITORY], test "x$enable_virtuals_repository" = "xyes")
+AM_CONDITIONAL(ENABLE_[]m4_translit($1, [a-z], [A-Z])_REPOSITORY, test "x$enable_$1_repository" = "xyes")
+ ])
+
+m4_foreach(reponame, [ALL_REPOSITORIES_m4], [
+REPOSITORY_GROUP_IF(reponame)
+])
+
+AC_DEFINE_UNQUOTED(REPOSITORY_GROUPS_DECLS,
+ m4_foreach(reponame,
+ [ALL_REPOSITORIES_m4],
+ [ struct reponame; ] ) struct semicolon_goes_where { },
+ [Our repository groups])
+
+dnl make sure the code works even if everything's enabled
+REPOSITORY_GROUP_IF(dummy)
-if echo $repositories | tr ' ' '\n' | grep '^gems$' >/dev/null ; then
- need_syck_check=yes
- need_gem_check=yes
-fi
dnl }}}
dnl {{{ environments
-ALL_ENVIRONMENTS="no_config paludis portage test"
+m4_define(ALL_ENVIRONMENTS_m4, [no_config,paludis,portage,test])
+ALL_ENVIRONMENTS=`echo ALL_ENVIRONMENTS_m4 | tr , ' '`
DEFAULT_ENVIRONMENTS="no_config paludis test"
AC_MSG_CHECKING([which environments to build...])
AC_ARG_WITH([environments],
@@ -1356,6 +1372,32 @@ AC_MSG_RESULT([$environments])
BUILD_ENVIRONMENTS="$environments"
AC_SUBST([ALL_ENVIRONMENTS])
AC_SUBST([BUILD_ENVIRONMENTS])
+
+AC_DEFUN([ENVIRONMENT_GROUP_IF], [
+enable_$1_environment=
+if echo $environments | tr ' ' '\n' | grep '^$1$' >/dev/null ; then
+ enable_$1_environment=yes
+ AC_DEFINE_UNQUOTED([ENVIRONMENT_GROUP_IF_$1], [$1], [The $1 environment])
+ AC_DEFINE_UNQUOTED(ENABLE_[]m4_translit($1, [a-z], [A-Z])_ENVIRONMENT, [1], [Enable $1 environment])
+else
+ AC_DEFINE_UNQUOTED([ENVIRONMENT_GROUP_IF_$1], [], [Do not have the $1 environment])
+fi
+AM_CONDITIONAL(ENABLE_[]m4_translit($1, [a-z], [A-Z])_ENVIRONMENT, test "x$enable_$1_environment" = "xyes")
+ ])
+
+m4_foreach(envname, [ALL_ENVIRONMENTS_m4], [
+ENVIRONMENT_GROUP_IF(envname)
+])
+
+AC_DEFINE_UNQUOTED(ENVIRONMENT_GROUPS_DECLS,
+ m4_foreach(envname,
+ [ALL_ENVIRONMENTS_m4],
+ [ struct envname; ] ) struct semicolon_goes_where { },
+ [Our environment groups])
+
+dnl make sure the code works even if everything's enabled
+ENVIRONMENT_GROUP_IF(dummy)
+
dnl }}}
dnl {{{ distribution
diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4
index 9bf8711..26415a0 100644
--- a/paludis/Makefile.am.m4
+++ b/paludis/Makefile.am.m4
@@ -19,8 +19,6 @@ $1_TEST_LDADD = \
ihateautomake.o \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(DYNAMIC_LD_LIBS)
@@ -82,7 +80,7 @@ EXTRA_DIST = about.hh.in Makefile.am.m4 paludis.hh.m4 files.m4 \
testscriptlist srlist srcleanlist selist secleanlist \
hooker.bash \
stripper_TEST_binary.cc
-SUBDIRS = distributions fetchers syncers util selinux . repositories environments args resolver
+SUBDIRS = distributions fetchers syncers util selinux repositories environments . args resolver
BUILT_SOURCES = srcleanlist secleanlist
libpaludis_@PALUDIS_PC_SLOT@_la_SOURCES = filelist
@@ -105,8 +103,43 @@ libpaludissohooks_TEST_@PALUDIS_PC_SLOT@_la_LDFLAGS = -rpath /nowhere -version-i
libpaludissohooks_TEST_@PALUDIS_PC_SLOT@_la_LIBADD = libpaludis_@PALUDIS_PC_SLOT@.la
+repositories_libadd =
+
+define(`condrepo', `
+if ENABLE_`'translit($1,`a-z',`A-Z')_REPOSITORY
+repositories_libadd += $(top_builddir)/paludis/repositories/$1/libpaludis$1repository.la
+endif
+')
+
+condrepo(accounts)
+condrepo(cran)
+condrepo(dummy)
+condrepo(e)
+condrepo(fake)
+condrepo(gems)
+condrepo(unavailable)
+condrepo(unpackaged)
+condrepo(unwritten)
+condrepo(virtuals)
+
+environments_libadd =
+
+define(`condenv', `
+if ENABLE_`'translit($1,`a-z',`A-Z')_ENVIRONMENT
+environments_libadd += $(top_builddir)/paludis/environments/$1/libpaludis`'translit($1,_,)environment.la
+endif
+')
+
+condenv(dummy)
+condenv(no_config)
+condenv(paludis)
+condenv(portage)
+condenv(test)
+
libpaludis_@PALUDIS_PC_SLOT@_la_LIBADD = \
$(top_builddir)/paludis/selinux/libpaludisselinux_@PALUDIS_PC_SLOT@.la \
+ $(repositories_libadd) \
+ $(environments_libadd) \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
@DYNAMIC_LD_LIBS@ \
$(PTHREAD_LIBS)
@@ -121,8 +154,6 @@ dep_list_TEST_blockers_LDADD = \
ihateautomake.o \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/environment_factory.cc b/paludis/environment_factory.cc
index 7cf0bc7..11003ae 100644
--- a/paludis/environment_factory.cc
+++ b/paludis/environment_factory.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -31,8 +31,6 @@
#include <paludis/distribution.hh>
#include <paludis/about.hh>
#include <tr1/unordered_map>
-#include <dlfcn.h>
-#include <stdint.h>
#include <list>
#include "config.h"
@@ -46,17 +44,29 @@ namespace paludis
struct Implementation<EnvironmentFactory>
{
Keys keys;
- std::list<void *> dl_opened;
};
+
+ namespace environment_groups
+ {
+ ENVIRONMENT_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_environment<NoType<0u> >(EnvironmentFactory * const)
+ {
+ }
}
EnvironmentFactory::EnvironmentFactory() :
PrivateImplementationPattern<EnvironmentFactory>(new Implementation<EnvironmentFactory>)
{
- FSEntry so_dir(getenv_with_default("PALUDIS_ENVIRONMENT_SO_DIR", LIBDIR "/paludis/environments"));
- if (! so_dir.is_directory())
- throw InternalError(PALUDIS_HERE, "PALUDIS_ENVIRONMENT_SO_DIR '" + stringify(so_dir) + "' not a directory");
- _load_dir(so_dir);
+ using namespace environment_groups;
+
+ register_environment<ENVIRONMENT_GROUP_IF_dummy>(this);
+ register_environment<ENVIRONMENT_GROUP_IF_no_config>(this);
+ register_environment<ENVIRONMENT_GROUP_IF_paludis>(this);
+ register_environment<ENVIRONMENT_GROUP_IF_portage>(this);
+ register_environment<ENVIRONMENT_GROUP_IF_test>(this);
}
EnvironmentFactory::~EnvironmentFactory()
@@ -109,43 +119,6 @@ EnvironmentFactory::create(const std::string & s) const
}
void
-EnvironmentFactory::_load_dir(const FSEntry & so_dir)
-{
- for (DirIterator d(so_dir), d_end ; d != d_end ; ++d)
- {
- if (d->is_directory())
- _load_dir(*d);
-
- if (! is_file_with_extension(*d, "_" + stringify(PALUDIS_PC_SLOT) + ".so." +
- stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR),
- IsFileWithOptions()))
- continue;
-
- /* don't use RTLD_LOCAL, g++ is over happy about template instantiations, and it
- * can lead to multiple singleton instances. */
- void * dl(dlopen(stringify(*d).c_str(), RTLD_GLOBAL | RTLD_NOW));
-
- if (dl)
- {
- _imp->dl_opened.push_back(dl);
-
- void * reg(dlsym(dl, "paludis_initialise_environment_so"));
- if (reg)
- {
- reinterpret_cast<void (*)(EnvironmentFactory * const)>(reinterpret_cast<uintptr_t>(reg))(this);
- }
- else
- throw InternalError(PALUDIS_HERE, "No paludis_initialise_environment_so function defined in '" + stringify(*d) + "'");
- }
- else
- throw InternalError(PALUDIS_HERE, "Couldn't dlopen '" + stringify(*d) + "': " + stringify(dlerror()));
- }
-
- if ((so_dir / ".libs").is_directory())
- _load_dir(so_dir / ".libs");
-}
-
-void
EnvironmentFactory::add_environment_format(
const std::tr1::shared_ptr<const Set<std::string> > & formats,
const CreateFunction & create_function
diff --git a/paludis/environment_factory.hh b/paludis/environment_factory.hh
index b5821bf..6b9b346 100644
--- a/paludis/environment_factory.hh
+++ b/paludis/environment_factory.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -26,6 +26,7 @@
#include <paludis/util/private_implementation_pattern.hh>
#include <paludis/util/set-fwd.hh>
#include <paludis/util/fs_entry-fwd.hh>
+#include <paludis/util/no_type.hh>
#include <paludis/environment-fwd.hh>
#include <tr1/memory>
#include <tr1/functional>
@@ -52,8 +53,6 @@ namespace paludis
EnvironmentFactory();
~EnvironmentFactory();
- void _load_dir(const FSEntry &);
-
public:
typedef std::tr1::function<const std::tr1::shared_ptr<Environment>(const std::string &)> CreateFunction;
@@ -88,6 +87,9 @@ namespace paludis
);
};
+ template <typename EnvironmentClass_ = NoType<0u> >
+ void register_environment(EnvironmentFactory * const);
+
#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
extern template class PrivateImplementationPattern<EnvironmentFactory>;
extern template class InstantiationPolicy<EnvironmentFactory, instantiation_method::SingletonTag>;
diff --git a/paludis/environments/no_config/Makefile.am b/paludis/environments/no_config/Makefile.am
index b870a1a..c44f34f 100644
--- a/paludis/environments/no_config/Makefile.am
+++ b/paludis/environments/no_config/Makefile.am
@@ -8,18 +8,11 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisnoconfigenvironment_la_SOURCES = \
no_config_environment.cc no_config_environment.hh \
registration.cc
-libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la
-
-libenvdir = $(libdir)/paludis/environments
-libenv_LTLIBRARIES = libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisnoconfigenvironment.la
paludis_environment_no_config_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/environments/no_config
paludis_environment_no_config_include_HEADERS = \
@@ -53,7 +46,6 @@ check_SCRIPTS = no_config_environment_TEST_setup.sh no_config_environment_TEST_c
no_config_environment_TEST_SOURCES = no_config_environment_TEST.cc
no_config_environment_TEST_LDADD = \
- libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
diff --git a/paludis/environments/no_config/registration.cc b/paludis/environments/no_config/registration.cc
index 13aefa5..8b27039 100644
--- a/paludis/environments/no_config/registration.cc
+++ b/paludis/environments/no_config/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -27,6 +27,7 @@
#include <paludis/util/sequence.hh>
#include <paludis/util/make_named_values.hh>
#include <list>
+#include "config.h"
using namespace paludis;
@@ -99,13 +100,20 @@ namespace
}
}
-extern "C" void paludis_initialise_environment_so(EnvironmentFactory * const) PALUDIS_VISIBLE;
-
-void paludis_initialise_environment_so(EnvironmentFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > no_config_formats(new Set<std::string>);
- no_config_formats->insert("no_config");
- no_config_formats->insert("no-config");
- factory->add_environment_format(no_config_formats, &make_no_config_environment);
+ namespace environment_groups
+ {
+ ENVIRONMENT_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_environment<environment_groups::no_config>(EnvironmentFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > no_config_formats(new Set<std::string>);
+ no_config_formats->insert("no_config");
+ no_config_formats->insert("no-config");
+ factory->add_environment_format(no_config_formats, &make_no_config_environment);
+ }
}
diff --git a/paludis/environments/paludis/Makefile.am b/paludis/environments/paludis/Makefile.am
index 1833940..a80e63c 100644
--- a/paludis/environments/paludis/Makefile.am
+++ b/paludis/environments/paludis/Makefile.am
@@ -10,7 +10,7 @@ DEFS= \
-DLIBDIR=\"$(libdir)\" \
-DSHAREDIR=\"$(datarootdir)\"
-libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludispaludisenvironment_la_SOURCES = \
action_to_string.cc action_to_string.hh \
bashable_conf.cc bashable_conf.hh \
keywords_conf.cc keywords_conf.hh \
@@ -26,36 +26,17 @@ libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \
extra_distribution_data.cc extra_distribution_data.hh \
registration.cc
-libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
shareenvpaludisdir = $(datarootdir)/paludis/environments/paludis/
dist_shareenvpaludis_DATA = \
default_output.conf \
tests_output.conf
-if ! MONOLITHIC
-
-libpaludispaludisenvironment_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la
-
-endif
-
libenvdir = $(libdir)/paludis/environments
-if MONOLITHIC
-
-noinst_LTLIBRARIES = libpaludispaludisenvironment_@PALUDIS_PC_SLOT@.la
-
-else
-
-libenv_LTLIBRARIES = libpaludispaludisenvironment_@PALUDIS_PC_SLOT@.la
-
-endif
+noinst_LTLIBRARIES = libpaludispaludisenvironment.la
-paludis_environment_paludis_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/environments/paludis
-paludis_environment_paludis_include_HEADERS = \
+noinst_HEADERS = \
paludis_config.hh \
paludis_environment.hh \
use_conf.hh \
@@ -105,7 +86,6 @@ check_SCRIPTS = paludis_environment_TEST_setup.sh paludis_environment_TEST_clean
paludis_environment_TEST_SOURCES = paludis_environment_TEST.cc
paludis_environment_TEST_LDADD = \
- libpaludispaludisenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
diff --git a/paludis/environments/paludis/registration.cc b/paludis/environments/paludis/registration.cc
index e8efc02..943754f 100644
--- a/paludis/environments/paludis/registration.cc
+++ b/paludis/environments/paludis/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -20,6 +20,7 @@
#include <paludis/environments/paludis/paludis_environment.hh>
#include <paludis/environment_factory.hh>
#include <paludis/util/set.hh>
+#include "config.h"
using namespace paludis;
@@ -32,12 +33,19 @@ namespace
}
}
-extern "C" void paludis_initialise_environment_so(EnvironmentFactory * const) PALUDIS_VISIBLE;
-
-void paludis_initialise_environment_so(EnvironmentFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > paludis_formats(new Set<std::string>);
- paludis_formats->insert("paludis");
- factory->add_environment_format(paludis_formats, &make_paludis_environment);
+ namespace environment_groups
+ {
+ ENVIRONMENT_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_environment<environment_groups::paludis>(EnvironmentFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > paludis_formats(new Set<std::string>);
+ paludis_formats->insert("paludis");
+ factory->add_environment_format(paludis_formats, &make_paludis_environment);
+ }
}
diff --git a/paludis/environments/portage/Makefile.am b/paludis/environments/portage/Makefile.am
index ffa45d8..7df95f8 100644
--- a/paludis/environments/portage/Makefile.am
+++ b/paludis/environments/portage/Makefile.am
@@ -9,25 +9,16 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-libpaludisportageenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisportageenvironment_la_SOURCES = \
registration.cc \
portage_environment.cc portage_environment.hh
-libpaludisportageenvironment_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-libpaludisportageenvironment_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la
-
-libenvdir = $(libdir)/paludis/environments
-
libexecenvdir = $(libexecdir)/paludis/environments/portage/
libexecenv_SCRIPTS = bashrc
-libenv_LTLIBRARIES = libpaludisportageenvironment_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisportageenvironment.la
-paludis_environment_portage_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/environments/portage
-paludis_environment_portage_include_HEADERS = \
+noinst_HEADERS = \
portage_environment.hh
EXTRA_DIST = \
@@ -65,7 +56,6 @@ TESTS_ENVIRONMENT = env \
portage_environment_TEST_SOURCES = portage_environment_TEST.cc
portage_environment_TEST_LDADD = \
- libpaludisportageenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
diff --git a/paludis/environments/portage/registration.cc b/paludis/environments/portage/registration.cc
index 69b3a36..eac02bb 100644
--- a/paludis/environments/portage/registration.cc
+++ b/paludis/environments/portage/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -20,6 +20,7 @@
#include <paludis/environment_factory.hh>
#include <paludis/environments/portage/portage_environment.hh>
#include <paludis/util/set.hh>
+#include "config.h"
using namespace paludis;
@@ -32,12 +33,19 @@ namespace
}
}
-extern "C" void paludis_initialise_environment_so(EnvironmentFactory * const) PALUDIS_VISIBLE;
-
-void paludis_initialise_environment_so(EnvironmentFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > portage_formats(new Set<std::string>);
- portage_formats->insert("portage");
- factory->add_environment_format(portage_formats, &make_portage_environment);
+ namespace environment_groups
+ {
+ ENVIRONMENT_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_environment<environment_groups::portage>(EnvironmentFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > portage_formats(new Set<std::string>);
+ portage_formats->insert("portage");
+ factory->add_environment_format(portage_formats, &make_portage_environment);
+ }
}
diff --git a/paludis/environments/test/Makefile.am b/paludis/environments/test/Makefile.am
index 3080d7e..666ab2b 100644
--- a/paludis/environments/test/Makefile.am
+++ b/paludis/environments/test/Makefile.am
@@ -7,29 +7,11 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-libpaludistestenvironment_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludistestenvironment_la_SOURCES = \
test_environment.cc test_environment.hh \
registration.cc
-libpaludistestenvironment_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-if ! MONOLITHIC
-
-libpaludistestenvironment_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la
-
-endif
-
-if MONOLITHIC
-
-noinst_LTLIBRARIES = libpaludistestenvironment_@PALUDIS_PC_SLOT@.la
-
-else
-
-lib_LTLIBRARIES = libpaludistestenvironment_@PALUDIS_PC_SLOT@.la
-
-endif
+noinst_LTLIBRARIES = libpaludistestenvironment.la
paludis_environment_test_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/environments/test
paludis_environment_test_include_HEADERS = test_environment.hh
@@ -44,3 +26,4 @@ distcheck-deps : distcheck-deps-subdirs
distcheck-deps-subdirs :
for s in $(SUBDIRS) . ; do if test x$$s = x. ; then $(MAKE) distcheck-deps-local || exit 1 ; \
else $(MAKE) -C $$s distcheck-deps || exit 1 ; fi ; done
+
diff --git a/paludis/environments/test/registration.cc b/paludis/environments/test/registration.cc
index 1b4a4c3..dae7c0c 100644
--- a/paludis/environments/test/registration.cc
+++ b/paludis/environments/test/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -19,12 +19,20 @@
#include <paludis/environment_factory.hh>
#include <paludis/environments/test/test_environment.hh>
+#include "config.h"
using namespace paludis;
-extern "C" void paludis_initialise_environment_so(EnvironmentFactory * const) PALUDIS_VISIBLE;
-
-void paludis_initialise_environment_so(EnvironmentFactory * const)
+namespace paludis
{
+ namespace environment_groups
+ {
+ ENVIRONMENT_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_environment<environment_groups::test>(EnvironmentFactory * const)
+ {
+ }
}
diff --git a/paludis/repositories/accounts/Makefile.am b/paludis/repositories/accounts/Makefile.am
index 9dba7f9..6acb2dc 100644
--- a/paludis/repositories/accounts/Makefile.am
+++ b/paludis/repositories/accounts/Makefile.am
@@ -11,13 +11,9 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-paludis_repositories_libdir = $(libdir)/paludis/repositories
-paludis_repositories_lib_LTLIBRARIES = libpaludisaccountsrepository_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisaccountsrepository.la
-paludis_repositories_accounts_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/accounts/
-libpaludisaccountsrepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_accounts_include_HEADERS = \
+noinst_HEADERS = \
accounts_exceptions.hh \
accounts_handler.hh \
accounts_repository.hh \
@@ -29,7 +25,7 @@ paludis_repositories_accounts_include_HEADERS = \
accounts_installed_mask.hh \
installed_accounts_id.hh
-libpaludisaccountsrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisaccountsrepository_la_SOURCES = \
accounts_exceptions.cc \
accounts_handler.cc \
accounts_repository.cc \
@@ -41,21 +37,14 @@ libpaludisaccountsrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
dummy_accounts_handler.cc \
passwd_accounts_handler.cc \
registration.cc \
- $(paludis_repositories_accounts_include_HEADERS)
-
-libpaludisaccountsrepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
+ $(noinst_HEADERS)
accounts_repository_TEST_SOURCES = accounts_repository_TEST.cc
accounts_repository_TEST_LDADD = \
- libpaludisaccountsrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/accounts/registration.cc b/paludis/repositories/accounts/registration.cc
index 3131145..67d8f48 100644
--- a/paludis/repositories/accounts/registration.cc
+++ b/paludis/repositories/accounts/registration.cc
@@ -21,6 +21,7 @@
#include <paludis/repositories/accounts/accounts_repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
+#include "config.h"
using namespace paludis;
using namespace paludis::accounts_repository;
@@ -36,29 +37,36 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > accounts_formats(new Set<std::string>);
- accounts_formats->insert("accounts");
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
- factory->add_repository_format(accounts_formats,
- &AccountsRepository::repository_factory_name,
- &generic_importance,
- &AccountsRepository::repository_factory_create,
- &AccountsRepository::repository_factory_dependencies
- );
+ template <>
+ void register_repositories<repository_groups::accounts>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > accounts_formats(new Set<std::string>);
+ accounts_formats->insert("accounts");
+
+ factory->add_repository_format(accounts_formats,
+ &AccountsRepository::repository_factory_name,
+ &generic_importance,
+ &AccountsRepository::repository_factory_create,
+ &AccountsRepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > installed_accounts_formats(new Set<std::string>);
- installed_accounts_formats->insert("installed_accounts");
- installed_accounts_formats->insert("installed-accounts");
+ std::tr1::shared_ptr<Set<std::string> > installed_accounts_formats(new Set<std::string>);
+ installed_accounts_formats->insert("installed_accounts");
+ installed_accounts_formats->insert("installed-accounts");
- factory->add_repository_format(installed_accounts_formats,
- &AccountsRepository::repository_factory_installed_name,
- &generic_importance,
- &AccountsRepository::repository_factory_installed_create,
- &AccountsRepository::repository_factory_installed_dependencies
- );
+ factory->add_repository_format(installed_accounts_formats,
+ &AccountsRepository::repository_factory_installed_name,
+ &generic_importance,
+ &AccountsRepository::repository_factory_installed_create,
+ &AccountsRepository::repository_factory_installed_dependencies
+ );
+ }
}
diff --git a/paludis/repositories/cran/Makefile.am b/paludis/repositories/cran/Makefile.am
index 4151921..ad50c27 100644
--- a/paludis/repositories/cran/Makefile.am
+++ b/paludis/repositories/cran/Makefile.am
@@ -11,20 +11,9 @@ DEFS= \
paludis_repositories_libdir = $(libdir)/paludis/repositories
-if MONOLITHIC
+noinst_LTLIBRARIES = libpaludiscranrepository.la
-noinst_LTLIBRARIES = libpaludiscranrepository_@PALUDIS_PC_SLOT@.la
-
-else
-
-paludis_repositories_lib_LTLIBRARIES = libpaludiscranrepository_@PALUDIS_PC_SLOT@.la
-
-endif
-
-paludis_repositories_cran_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/cran/
-libpaludiscranrepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_cran_include_HEADERS = \
+noinst_HEADERS = \
cran_package_id.hh \
cran_dep_parser.hh \
cran_repository.hh \
@@ -36,7 +25,7 @@ paludis_repositories_cran_include_HEADERS = \
dep_spec_pretty_printer.hh \
package_dep_spec.hh
-libpaludiscranrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludiscranrepository_la_SOURCES = \
cran_package_id.cc \
cran_dep_parser.cc \
cran_repository.cc \
@@ -50,11 +39,6 @@ libpaludiscranrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
package_dep_spec.cc \
$(paludis_repositories_cran_include_HEADERS)
-libpaludiscranrepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
-
TESTS = \
cran_dep_parser_TEST \
cran_repository_TEST \
@@ -65,8 +49,9 @@ cran_dep_parser_TEST_SOURCES = cran_dep_parser_TEST.cc
cran_dep_parser_TEST_LDADD = \
$(top_builddir)/paludis/util/test_extras.o \
- $(top_builddir)/test/libtest.a \
- libpaludiscranrepository_@PALUDIS_PC_SLOT@.la
+ $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
+ $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
+ $(top_builddir)/test/libtest.a
cran_dep_parser_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -75,10 +60,8 @@ cran_installed_repository_TEST_SOURCES = cran_installed_repository_TEST.cc
cran_installed_repository_TEST_LDADD = \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- libpaludiscranrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(DYNAMIC_LD_LIBS)
cran_installed_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -88,10 +71,8 @@ cran_repository_TEST_SOURCES = cran_repository_TEST.cc
cran_repository_TEST_LDADD = \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- libpaludiscranrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(DYNAMIC_LD_LIBS)
cran_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -101,10 +82,8 @@ description_file_TEST_SOURCES = description_file_TEST.cc
description_file_TEST_LDADD = \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- libpaludiscranrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(DYNAMIC_LD_LIBS)
description_file_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
diff --git a/paludis/repositories/cran/registration.cc b/paludis/repositories/cran/registration.cc
index 8cfe344..d1edb44 100644
--- a/paludis/repositories/cran/registration.cc
+++ b/paludis/repositories/cran/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,11 +22,10 @@
#include <paludis/repositories/cran/cran_installed_repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
+#include "config.h"
using namespace paludis;
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
namespace
{
int generic_importance(const Environment * const, const std::tr1::function<std::string (const std::string &)> & f)
@@ -38,29 +37,38 @@ namespace
}
}
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > cran_formats(new Set<std::string>);
- cran_formats->insert("cran");
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
- factory->add_repository_format(
- cran_formats,
- &CRANRepository::repository_factory_name,
- &generic_importance,
- &CRANRepository::repository_factory_create,
- &CRANRepository::repository_factory_dependencies
- );
+ template <>
+ void register_repositories<repository_groups::cran>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > cran_formats(new Set<std::string>);
+ cran_formats->insert("cran");
+
+ factory->add_repository_format(
+ cran_formats,
+ &CRANRepository::repository_factory_name,
+ &generic_importance,
+ &CRANRepository::repository_factory_create,
+ &CRANRepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > installed_cran_formats(new Set<std::string>);
- installed_cran_formats->insert("installed_cran");
- installed_cran_formats->insert("installed-cran");
+ std::tr1::shared_ptr<Set<std::string> > installed_cran_formats(new Set<std::string>);
+ installed_cran_formats->insert("installed_cran");
+ installed_cran_formats->insert("installed-cran");
- factory->add_repository_format(
- installed_cran_formats,
- &CRANInstalledRepository::repository_factory_name,
- &generic_importance,
- &CRANInstalledRepository::repository_factory_create,
- &CRANInstalledRepository::repository_factory_dependencies
- );
+ factory->add_repository_format(
+ installed_cran_formats,
+ &CRANInstalledRepository::repository_factory_name,
+ &generic_importance,
+ &CRANInstalledRepository::repository_factory_create,
+ &CRANInstalledRepository::repository_factory_dependencies
+ );
+ }
}
diff --git a/paludis/repositories/e/Makefile.am b/paludis/repositories/e/Makefile.am
index 8ff1026..b90967e 100644
--- a/paludis/repositories/e/Makefile.am
+++ b/paludis/repositories/e/Makefile.am
@@ -14,17 +14,13 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-paludis_repositories_libdir = $(libdir)/paludis/repositories
-paludis_repositories_lib_LTLIBRARIES = libpaludiserepository_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludiserepository.la
if ENABLE_XML
lib_LTLIBRARIES = libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@.la
endif
-paludis_repositories_e_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/e/
-libpaludiserepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_e_include_HEADERS = \
+noinst_HEADERS = \
aa_visitor.hh \
can_skip_phase.hh \
check_fetched_files_visitor.hh \
@@ -87,7 +83,7 @@ paludis_repositories_e_include_HEADERS = \
vdb_repository.hh \
vdb_unmerger.hh
-libpaludiserepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludiserepository_la_SOURCES = \
aa_visitor.cc \
can_skip_phase.cc \
check_fetched_files_visitor.cc \
@@ -144,22 +140,14 @@ libpaludiserepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
vdb_merger.cc \
vdb_repository.cc \
vdb_unmerger.cc \
- $(paludis_repositories_e_include_HEADERS)
-
-libpaludiserepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
+ $(noinst_HEADERS)
e_repository_TEST_SOURCES = e_repository_TEST.cc
e_repository_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -168,12 +156,9 @@ e_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLAGS_NO
depend_rdepend_TEST_SOURCES = depend_rdepend_TEST.cc
depend_rdepend_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -182,12 +167,9 @@ depend_rdepend_TEST_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLAGS_
e_repository_TEST_ever_SOURCES = e_repository_TEST_ever.cc
e_repository_TEST_ever_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -196,12 +178,9 @@ e_repository_TEST_ever_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLA
e_repository_TEST_phases_SOURCES = e_repository_TEST_phases.cc
e_repository_TEST_phases_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -210,12 +189,9 @@ e_repository_TEST_phases_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXF
e_repository_TEST_exlibs_SOURCES = e_repository_TEST_exlibs.cc
e_repository_TEST_exlibs_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -224,12 +200,9 @@ e_repository_TEST_exlibs_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXF
e_repository_TEST_replacing_SOURCES = e_repository_TEST_replacing.cc
e_repository_TEST_replacing_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -238,12 +211,9 @@ e_repository_TEST_replacing_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_C
vdb_repository_TEST_SOURCES = vdb_repository_TEST.cc
vdb_repository_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -252,12 +222,9 @@ vdb_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLAGS_
exndbam_repository_TEST_SOURCES = exndbam_repository_TEST.cc
exndbam_repository_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -266,11 +233,9 @@ exndbam_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFL
vdb_merger_TEST_SOURCES = vdb_merger_TEST.cc
vdb_merger_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -279,11 +244,9 @@ vdb_merger_TEST_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLAGS_NO_D
vdb_unmerger_TEST_SOURCES = vdb_unmerger_TEST.cc
vdb_unmerger_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -292,13 +255,9 @@ vdb_unmerger_TEST_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLAGS_NO
e_repository_sets_TEST_SOURCES = e_repository_sets_TEST.cc
e_repository_sets_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -307,12 +266,9 @@ e_repository_sets_TEST_CXXFLAGS = $(AM_CXXFLAGS) -I$(top_srcdir) @PALUDIS_CXXFLA
dep_spec_pretty_printer_TEST_SOURCES = dep_spec_pretty_printer_TEST.cc
dep_spec_pretty_printer_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -321,12 +277,9 @@ dep_spec_pretty_printer_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING
dep_parser_TEST_SOURCES = dep_parser_TEST.cc
dep_parser_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -335,12 +288,9 @@ dep_parser_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
aa_visitor_TEST_SOURCES = aa_visitor_TEST.cc
aa_visitor_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -349,12 +299,9 @@ aa_visitor_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
fetch_visitor_TEST_SOURCES = fetch_visitor_TEST.cc
fetch_visitor_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -363,12 +310,9 @@ fetch_visitor_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
source_uri_finder_TEST_SOURCES = source_uri_finder_TEST.cc
source_uri_finder_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -377,12 +321,9 @@ source_uri_finder_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
fix_locked_dependencies_TEST_SOURCES = fix_locked_dependencies_TEST.cc
fix_locked_dependencies_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -391,12 +332,9 @@ fix_locked_dependencies_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBU
ebuild_flat_metadata_cache_TEST_SOURCES = ebuild_flat_metadata_cache_TEST.cc
ebuild_flat_metadata_cache_TEST_LDADD = \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -530,7 +468,6 @@ libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@_la_CXXFLAGS = $(AM_CXXFLAGS) @L
libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@_la_LIBADD = \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
@LIBXML2DEPS_LIBS@
libpaludiserepositoryxmlthings_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
@@ -543,10 +480,8 @@ xml_things_TEST_SOURCES = xml_things_TEST.cc
xml_things_TEST_LDADD = \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- libpaludiserepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/e/qa/Makefile.am b/paludis/repositories/e/qa/Makefile.am
index aae19ec..01a3f0a 100644
--- a/paludis/repositories/e/qa/Makefile.am
+++ b/paludis/repositories/e/qa/Makefile.am
@@ -28,8 +28,7 @@ dist_paludis_qa_data_DATA = \
spec_keys_pds_blacklist.SDEPEND.conf \
spec_keys_pds_blacklist.PROVIDE.conf
-paludis_repositories_e_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/e/
-paludis_repositories_e_include_HEADERS = \
+noinst_HEADERS = \
eapi_supported.hh \
metadata_keys.hh \
extractors.hh \
@@ -66,6 +65,9 @@ paludis_repositories_e_include_HEADERS = \
lib_LTLIBRARIES = libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la
+libpaludiserepositoryqa_@PALUDIS_PC_SLOT@_la_LDFLAGS = \
+ $(PCRECPPDEPS_LIBS)
+
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@_la_SOURCES = \
qa.cc \
eapi_supported.cc \
@@ -103,15 +105,6 @@ libpaludiserepositoryqa_@PALUDIS_PC_SLOT@_la_SOURCES = \
categories.cc \
$(paludis_repositories_e_include_HEADERS)
-libpaludiserepositoryqa_@PALUDIS_PC_SLOT@_la_LDFLAGS = \
- -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0 \
- $(PCRECPPDEPS_LIBS)
-
-libpaludiserepositoryqa_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la
-
dist_check_SCRIPTS = \
visibility_TEST_setup.sh \
visibility_TEST_cleanup.sh \
@@ -153,7 +146,6 @@ TESTS = \
extractors_TEST \
homepage_key_TEST \
spec_keys_TEST \
- stray_files_TEST \
default_functions_TEST \
kv_variables_TEST \
visibility_TEST \
@@ -167,38 +159,19 @@ check_PROGRAMS = $(TESTS)
spec_keys_TEST_SOURCES = spec_keys_TEST.cc
spec_keys_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
spec_keys_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
-stray_files_TEST_SOURCES = stray_files_TEST.cc
-stray_files_TEST_LDADD = \
- libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/test_extras.o \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/test/libtest.a
-
-stray_files_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
-
extractors_TEST_SOURCES = extractors_TEST.cc
extractors_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
extractors_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -206,12 +179,9 @@ extractors_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
homepage_key_TEST_SOURCES = homepage_key_TEST.cc
homepage_key_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
homepage_key_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -219,12 +189,9 @@ homepage_key_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
visibility_TEST_SOURCES = visibility_TEST.cc
visibility_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
visibility_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -232,12 +199,9 @@ visibility_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
default_functions_TEST_SOURCES = default_functions_TEST.cc
default_functions_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
default_functions_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -245,12 +209,9 @@ default_functions_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
kv_variables_TEST_SOURCES = kv_variables_TEST.cc
kv_variables_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
kv_variables_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -258,12 +219,9 @@ kv_variables_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
misc_files_TEST_SOURCES = misc_files_TEST.cc
misc_files_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
misc_files_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -271,12 +229,9 @@ misc_files_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
manifest_TEST_SOURCES = manifest_TEST.cc
manifest_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
manifest_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -284,12 +239,9 @@ manifest_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
subshell_die_TEST_SOURCES = subshell_die_TEST.cc
subshell_die_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
subshell_die_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
@@ -297,12 +249,9 @@ subshell_die_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
function_keyword_TEST_SOURCES = function_keyword_TEST.cc
function_keyword_TEST_LDADD = \
libpaludiserepositoryqa_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a
function_keyword_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
diff --git a/paludis/repositories/e/qa/qa.cc b/paludis/repositories/e/qa/qa.cc
index e762390..8aa4ef1 100644
--- a/paludis/repositories/e/qa/qa.cc
+++ b/paludis/repositories/e/qa/qa.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -31,24 +31,6 @@ namespace paludis
class ERepository;
}
-extern "C"
-{
- void PALUDIS_VISIBLE paludis_initialise_repository_so(paludis::RepositoryFactory * const);
-
- void PALUDIS_VISIBLE check_qa(
- const Environment * const,
- const std::tr1::shared_ptr<const ERepository> &,
- const QACheckProperties &,
- const QACheckProperties &,
- const QAMessageLevel,
- QAReporter &,
- const FSEntry &);
-}
-
-void paludis_initialise_repository_so(paludis::RepositoryFactory * const)
-{
-}
-
void check_qa(
const Environment * const env,
const std::tr1::shared_ptr<const ERepository> & repo,
diff --git a/paludis/repositories/e/qa/stray_files_TEST.cc b/paludis/repositories/e/qa/stray_files_TEST.cc
deleted file mode 100644
index 8607d52..0000000
--- a/paludis/repositories/e/qa/stray_files_TEST.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-/* vim: set sw=4 sts=4 et foldmethod=syntax : */
-
-/*
- * Copyright (c) 2007 Ciaran McCreesh
- *
- * This file is part of the Paludis package manager. Paludis is free software;
- * you can redistribute it and/or modify it under the terms of the GNU General
- * Public License version 2, as published by the Free Software Foundation.
- *
- * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "stray_files.hh"
-#include <test/test_framework.hh>
-#include <test/test_runner.hh>
-
-using namespace paludis;
-using namespace paludis::erepository;
-using namespace test;
-
-namespace test_cases
-{
- struct StrayFilesTest : TestCase
- {
- StrayFilesTest() : TestCase("stray files") { }
-
- void run()
- {
- TEST_CHECK(true);
- }
- } test_stray_files;
-}
-
diff --git a/paludis/repositories/e/registration.cc b/paludis/repositories/e/registration.cc
index b263a83..4000ed2 100644
--- a/paludis/repositories/e/registration.cc
+++ b/paludis/repositories/e/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -25,6 +25,7 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
+#include "config.h"
using namespace paludis;
@@ -41,42 +42,49 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > ebuild_formats(new Set<std::string>);
- ebuild_formats->insert("ebuild");
- ebuild_formats->insert("exheres");
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
- factory->add_repository_format(
- ebuild_formats,
- &ERepository::repository_factory_name,
- &generic_importance,
- &ERepository::repository_factory_create,
- &ERepository::repository_factory_dependencies
- );
+ template <>
+ void register_repositories<repository_groups::e>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > ebuild_formats(new Set<std::string>);
+ ebuild_formats->insert("ebuild");
+ ebuild_formats->insert("exheres");
+
+ factory->add_repository_format(
+ ebuild_formats,
+ &ERepository::repository_factory_name,
+ &generic_importance,
+ &ERepository::repository_factory_create,
+ &ERepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > vdb_formats(new Set<std::string>);
- vdb_formats->insert("vdb");
+ std::tr1::shared_ptr<Set<std::string> > vdb_formats(new Set<std::string>);
+ vdb_formats->insert("vdb");
- factory->add_repository_format(
- vdb_formats,
- &VDBRepository::repository_factory_name,
- &generic_importance,
- &VDBRepository::repository_factory_create,
- &VDBRepository::repository_factory_dependencies
- );
+ factory->add_repository_format(
+ vdb_formats,
+ &VDBRepository::repository_factory_name,
+ &generic_importance,
+ &VDBRepository::repository_factory_create,
+ &VDBRepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > exndbam_formats(new Set<std::string>);
- exndbam_formats->insert("exndbam");
+ std::tr1::shared_ptr<Set<std::string> > exndbam_formats(new Set<std::string>);
+ exndbam_formats->insert("exndbam");
- factory->add_repository_format(
- exndbam_formats,
- &ExndbamRepository::repository_factory_name,
- &generic_importance,
- &ExndbamRepository::repository_factory_create,
- &ExndbamRepository::repository_factory_dependencies
- );
+ factory->add_repository_format(
+ exndbam_formats,
+ &ExndbamRepository::repository_factory_name,
+ &generic_importance,
+ &ExndbamRepository::repository_factory_create,
+ &ExndbamRepository::repository_factory_dependencies
+ );
+ }
}
diff --git a/paludis/repositories/e/xml_things.cc b/paludis/repositories/e/xml_things.cc
index 9ad1efc..904a4dd 100644
--- a/paludis/repositories/e/xml_things.cc
+++ b/paludis/repositories/e/xml_things.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -437,7 +437,3 @@ namespace paludis
class RepositoryFactory;
}
-extern "C" void PALUDIS_VISIBLE paludis_initialise_repository_so(paludis::RepositoryFactory * const)
-{
-}
-
diff --git a/paludis/repositories/fake/Makefile.am b/paludis/repositories/fake/Makefile.am
index fab6b29..5dffa63 100644
--- a/paludis/repositories/fake/Makefile.am
+++ b/paludis/repositories/fake/Makefile.am
@@ -7,8 +7,6 @@ DEFS= \
-DLIBEXECDIR=\"$(libexecdir)\" \
-DDATADIR=\"$(datadir)\"
-paludis_repositories_libdir = $(libdir)/paludis/repositories
-
TESTS_ENVIRONMENT = env \
PALUDIS_GEMS_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_srcdir)/paludis/repositories/gems/`" \
PALUDIS_EAPIS_DIR="$(top_srcdir)/paludis/repositories/e/eapis/" \
@@ -34,8 +32,6 @@ EXTRA_DIST = \
dep_parser_TEST.cc
fake_repository_TEST_LDADD = \
- libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
@@ -44,8 +40,6 @@ fake_repository_TEST_LDADD = \
fake_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
fake_installed_repository_TEST_LDADD = \
- libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
@@ -54,8 +48,6 @@ fake_installed_repository_TEST_LDADD = \
fake_installed_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
dep_parser_TEST_LDADD = \
- libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
@@ -72,9 +64,9 @@ fake_installed_repository_TEST_SOURCES = \
dep_parser_TEST_SOURCES = \
dep_parser_TEST.cc
-paludis_repositories_lib_LTLIBRARIES = libpaludisfakerepository_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisfakerepository.la
-libpaludisfakerepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisfakerepository_la_SOURCES = \
dep_parser.cc dep_parser.hh \
fake_repository_base.cc fake_repository_base.hh \
fake_repository.cc fake_repository.hh \
@@ -82,12 +74,6 @@ libpaludisfakerepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
fake_package_id.cc fake_package_id.hh \
registration.cc
-libpaludisfakerepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la
-
-libpaludisfakerepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
paludis_repositories_fake_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/fake/
paludis_repositories_fake_include_HEADERS = \
dep_parser.hh \
diff --git a/paludis/repositories/fake/registration.cc b/paludis/repositories/fake/registration.cc
index 014d821..2cfc9da 100644
--- a/paludis/repositories/fake/registration.cc
+++ b/paludis/repositories/fake/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,6 +23,7 @@
#include <paludis/util/destringify.hh>
#include <paludis/util/set.hh>
#include <paludis/environment.hh>
+#include "config.h"
using namespace paludis;
@@ -37,18 +38,26 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > fake_formats(new Set<std::string>);
- fake_formats->insert("fake_installed");
-
- factory->add_repository_format(
- fake_formats,
- FakeInstalledRepository::repository_factory_name,
- &generic_importance,
- FakeInstalledRepository::repository_factory_create,
- FakeInstalledRepository::repository_factory_dependencies
- );
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_repositories<repository_groups::fake>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > fake_formats(new Set<std::string>);
+ fake_formats->insert("fake_installed");
+
+ factory->add_repository_format(
+ fake_formats,
+ FakeInstalledRepository::repository_factory_name,
+ &generic_importance,
+ FakeInstalledRepository::repository_factory_create,
+ FakeInstalledRepository::repository_factory_dependencies
+ );
+ }
}
+
diff --git a/paludis/repositories/gems/Makefile.am b/paludis/repositories/gems/Makefile.am
index ae2d769..b8780e0 100644
--- a/paludis/repositories/gems/Makefile.am
+++ b/paludis/repositories/gems/Makefile.am
@@ -9,15 +9,11 @@ DEFS = \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-paludis_repositories_libdir = $(libdir)/paludis/repositories
paludis_gems_libexecdir = $(libexecdir)/paludis/gems
-paludis_repositories_lib_LTLIBRARIES = libpaludisgemsrepository_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisgemsrepository.la
-paludis_repositories_gems_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/gems/
-libpaludisgemsrepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_gems_include_HEADERS = \
+noinst_HEADERS = \
gems_repository.hh \
installed_gems_repository.hh \
exceptions.hh \
@@ -27,7 +23,7 @@ paludis_repositories_gems_include_HEADERS = \
params-fwd.hh params.hh \
extra_distribution_data.hh
-libpaludisgemsrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisgemsrepository_la_SOURCES = \
gems_repository.cc \
installed_gems_repository.cc \
params.cc \
@@ -37,11 +33,9 @@ libpaludisgemsrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
gem_specifications.cc \
extra_distribution_data.cc \
registration.cc \
- $(paludis_repositories_gems_include_HEADERS)
+ $(noinst_HEADERS)
-libpaludisgemsrepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
+libpaludisgemsrepository_la_LIBADD = \
-lsyck
gems_repository_TEST_SOURCES = gems_repository_TEST.cc
@@ -51,47 +45,37 @@ gem_specification_TEST_SOURCES = gem_specification_TEST.cc
gem_specifications_TEST_SOURCES = gem_specifications_TEST.cc
gems_repository_TEST_LDADD = \
- libpaludisgemsrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
-lsyck
installed_gems_repository_TEST_LDADD = \
- libpaludisgemsrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
-lsyck
yaml_TEST_LDADD = \
- libpaludisgemsrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
-lsyck
gem_specification_TEST_LDADD = \
- libpaludisgemsrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
-lsyck
gem_specifications_TEST_LDADD = \
- libpaludisgemsrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
-lsyck
diff --git a/paludis/repositories/gems/registration.cc b/paludis/repositories/gems/registration.cc
index e52505c..6b8286c 100644
--- a/paludis/repositories/gems/registration.cc
+++ b/paludis/repositories/gems/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -28,6 +28,7 @@
#include <paludis/util/destringify.hh>
#include <paludis/distribution.hh>
#include <paludis/environment.hh>
+#include "config.h"
using namespace paludis;
@@ -42,31 +43,38 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > gems_formats(new Set<std::string>);
- gems_formats->insert("gems");
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
- factory->add_repository_format(
- gems_formats,
- GemsRepository::repository_factory_name,
- &generic_importance,
- GemsRepository::repository_factory_create,
- GemsRepository::repository_factory_dependencies
- );
+ template <>
+ void register_repositories<repository_groups::gems>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > gems_formats(new Set<std::string>);
+ gems_formats->insert("gems");
+
+ factory->add_repository_format(
+ gems_formats,
+ GemsRepository::repository_factory_name,
+ &generic_importance,
+ GemsRepository::repository_factory_create,
+ GemsRepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > installed_gems_formats(new Set<std::string>);
- installed_gems_formats->insert("installed_gems");
- installed_gems_formats->insert("installed-gems");
+ std::tr1::shared_ptr<Set<std::string> > installed_gems_formats(new Set<std::string>);
+ installed_gems_formats->insert("installed_gems");
+ installed_gems_formats->insert("installed-gems");
- factory->add_repository_format(
- installed_gems_formats,
- InstalledGemsRepository::repository_factory_name,
- &generic_importance,
- InstalledGemsRepository::repository_factory_create,
- InstalledGemsRepository::repository_factory_dependencies
- );
+ factory->add_repository_format(
+ installed_gems_formats,
+ InstalledGemsRepository::repository_factory_name,
+ &generic_importance,
+ InstalledGemsRepository::repository_factory_create,
+ InstalledGemsRepository::repository_factory_dependencies
+ );
+ }
}
diff --git a/paludis/repositories/unavailable/Makefile.am b/paludis/repositories/unavailable/Makefile.am
index 54a1c5b..a89442a 100644
--- a/paludis/repositories/unavailable/Makefile.am
+++ b/paludis/repositories/unavailable/Makefile.am
@@ -11,42 +11,30 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-paludis_repositories_libdir = $(libdir)/paludis/repositories
-paludis_repositories_lib_LTLIBRARIES = libpaludisunavailablerepository_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisunavailablerepository.la
-paludis_repositories_unavailable_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/unavailable/
-libpaludisunavailablerepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_unavailable_include_HEADERS = \
+noinst_HEADERS = \
unavailable_repository.hh unavailable_repository-fwd.hh \
unavailable_id.hh \
unavailable_mask.hh \
unavailable_repository_store.hh \
unavailable_repository_file.hh unavailable_repository_file-fwd.hh
-libpaludisunavailablerepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisunavailablerepository_la_SOURCES = \
unavailable_repository.cc \
unavailable_id.cc \
unavailable_mask.cc \
unavailable_repository_store.cc \
unavailable_repository_file.cc \
registration.cc \
- $(paludis_repositories_unavailable_include_HEADERS)
-
-libpaludisunavailablerepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
+ $(noinst_HEADERS)
unavailable_repository_TEST_SOURCES = unavailable_repository_TEST.cc
unavailable_repository_TEST_LDADD = \
- libpaludisunavailablerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/unavailable/registration.cc b/paludis/repositories/unavailable/registration.cc
index 8249862..7634e3f 100644
--- a/paludis/repositories/unavailable/registration.cc
+++ b/paludis/repositories/unavailable/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -21,6 +21,7 @@
#include <paludis/repositories/unavailable/unavailable_repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
+#include "config.h"
using namespace paludis;
using namespace paludis::unavailable_repository;
@@ -36,18 +37,25 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > unavailable_formats(new Set<std::string>);
- unavailable_formats->insert("unavailable");
-
- factory->add_repository_format(unavailable_formats,
- &UnavailableRepository::repository_factory_name,
- &generic_importance,
- &UnavailableRepository::repository_factory_create,
- &UnavailableRepository::repository_factory_dependencies
- );
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_repositories<repository_groups::unavailable>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > unavailable_formats(new Set<std::string>);
+ unavailable_formats->insert("unavailable");
+
+ factory->add_repository_format(unavailable_formats,
+ &UnavailableRepository::repository_factory_name,
+ &generic_importance,
+ &UnavailableRepository::repository_factory_create,
+ &UnavailableRepository::repository_factory_dependencies
+ );
+ }
}
diff --git a/paludis/repositories/unpackaged/Makefile.am b/paludis/repositories/unpackaged/Makefile.am
index 242cfa5..9d3e3fe 100644
--- a/paludis/repositories/unpackaged/Makefile.am
+++ b/paludis/repositories/unpackaged/Makefile.am
@@ -10,13 +10,9 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-paludis_repositories_libdir = $(libdir)/paludis/repositories
-paludis_repositories_lib_LTLIBRARIES = libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisunpackagedrepository.la
-paludis_repositories_unpackaged_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/unpackaged/
-libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_unpackaged_include_HEADERS = \
+noinst_HEADERS = \
dep_parser.hh \
dep_printer.hh \
exceptions.hh \
@@ -27,7 +23,7 @@ paludis_repositories_unpackaged_include_HEADERS = \
installed_repository.hh \
installed_id.hh
-libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisunpackagedrepository_la_SOURCES = \
dep_parser.cc \
dep_printer.cc \
exceptions.cc \
@@ -38,21 +34,14 @@ libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
installed_repository.cc \
installed_id.cc \
registration.cc \
- $(paludis_repositories_unpackaged_include_HEADERS)
-
-libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
+ $(noinst_HEADERS)
unpackaged_repository_TEST_SOURCES = unpackaged_repository_TEST.cc
unpackaged_repository_TEST_LDADD = \
- libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -61,11 +50,9 @@ unpackaged_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGG
installed_repository_TEST_SOURCES = installed_repository_TEST.cc
installed_repository_TEST_LDADD = \
- libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
@@ -74,11 +61,9 @@ installed_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGI
dep_parser_TEST_SOURCES = dep_parser_TEST.cc
dep_parser_TEST_LDADD = \
- libpaludisunpackagedrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/unpackaged/registration.cc b/paludis/repositories/unpackaged/registration.cc
index a2dd13f..1ac7126 100644
--- a/paludis/repositories/unpackaged/registration.cc
+++ b/paludis/repositories/unpackaged/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -23,6 +23,7 @@
#include <paludis/repository_factory.hh>
#include <paludis/repositories/unpackaged/installed_repository.hh>
#include <paludis/repositories/unpackaged/unpackaged_repository.hh>
+#include "config.h"
using namespace paludis;
@@ -37,31 +38,38 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > unpackaged_formats(new Set<std::string>);
- unpackaged_formats->insert("unpackaged");
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
- factory->add_repository_format(
- unpackaged_formats,
- &UnpackagedRepository::repository_factory_name,
- &generic_importance,
- &UnpackagedRepository::repository_factory_create,
- &UnpackagedRepository::repository_factory_dependencies
- );
+ template <>
+ void register_repositories<repository_groups::unpackaged>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > unpackaged_formats(new Set<std::string>);
+ unpackaged_formats->insert("unpackaged");
+
+ factory->add_repository_format(
+ unpackaged_formats,
+ &UnpackagedRepository::repository_factory_name,
+ &generic_importance,
+ &UnpackagedRepository::repository_factory_create,
+ &UnpackagedRepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > installed_unpackaged_formats(new Set<std::string>);
- installed_unpackaged_formats->insert("installed_unpackaged");
- installed_unpackaged_formats->insert("installed-unpackaged");
+ std::tr1::shared_ptr<Set<std::string> > installed_unpackaged_formats(new Set<std::string>);
+ installed_unpackaged_formats->insert("installed_unpackaged");
+ installed_unpackaged_formats->insert("installed-unpackaged");
- factory->add_repository_format(
- installed_unpackaged_formats,
- &InstalledUnpackagedRepository::repository_factory_name,
- &generic_importance,
- &InstalledUnpackagedRepository::repository_factory_create,
- &InstalledUnpackagedRepository::repository_factory_dependencies
- );
+ factory->add_repository_format(
+ installed_unpackaged_formats,
+ &InstalledUnpackagedRepository::repository_factory_name,
+ &generic_importance,
+ &InstalledUnpackagedRepository::repository_factory_create,
+ &InstalledUnpackagedRepository::repository_factory_dependencies
+ );
+ }
}
diff --git a/paludis/repositories/unwritten/Makefile.am b/paludis/repositories/unwritten/Makefile.am
index 7e6561e..71fa08a 100644
--- a/paludis/repositories/unwritten/Makefile.am
+++ b/paludis/repositories/unwritten/Makefile.am
@@ -11,41 +11,30 @@ DEFS= \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\"
-paludis_repositories_libdir = $(libdir)/paludis/repositories
-paludis_repositories_lib_LTLIBRARIES = libpaludisunwrittenrepository_@PALUDIS_PC_SLOT@.la
+noinst_LTLIBRARIES = libpaludisunwrittenrepository.la
-paludis_repositories_unwritten_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/unwritten/
-libpaludisunwrittenrepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_unwritten_include_HEADERS = \
+noinst_HEADERS = \
unwritten_repository.hh \
unwritten_id.hh \
unwritten_mask.hh \
unwritten_repository_store.hh \
unwritten_repository_file.hh
-libpaludisunwrittenrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisunwrittenrepository_la_SOURCES = \
unwritten_repository.cc \
unwritten_id.cc \
unwritten_mask.cc \
unwritten_repository_store.cc \
unwritten_repository_file.cc \
registration.cc \
- $(paludis_repositories_unwritten_include_HEADERS)
-
-libpaludisunwrittenrepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
+ $(noinst_HEADERS)
unwritten_repository_TEST_SOURCES = unwritten_repository_TEST.cc
unwritten_repository_TEST_LDADD = \
- libpaludisunwrittenrepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/test/libtest.a \
$(DYNAMIC_LD_LIBS)
diff --git a/paludis/repositories/unwritten/registration.cc b/paludis/repositories/unwritten/registration.cc
index fc5fa55..f3a8b59 100644
--- a/paludis/repositories/unwritten/registration.cc
+++ b/paludis/repositories/unwritten/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -21,6 +21,7 @@
#include <paludis/repositories/unwritten/unwritten_repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
+#include "config.h"
using namespace paludis;
using namespace paludis::unwritten_repository;
@@ -36,18 +37,25 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > unwritten_formats(new Set<std::string>);
- unwritten_formats->insert("unwritten");
-
- factory->add_repository_format(unwritten_formats,
- &UnwrittenRepository::repository_factory_name,
- &generic_importance,
- &UnwrittenRepository::repository_factory_create,
- &UnwrittenRepository::repository_factory_dependencies
- );
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_repositories<repository_groups::unwritten>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > unwritten_formats(new Set<std::string>);
+ unwritten_formats->insert("unwritten");
+
+ factory->add_repository_format(unwritten_formats,
+ &UnwrittenRepository::repository_factory_name,
+ &generic_importance,
+ &UnwrittenRepository::repository_factory_create,
+ &UnwrittenRepository::repository_factory_dependencies
+ );
+ }
}
diff --git a/paludis/repositories/virtuals/Makefile.am b/paludis/repositories/virtuals/Makefile.am
index de8851a..1d9026f 100644
--- a/paludis/repositories/virtuals/Makefile.am
+++ b/paludis/repositories/virtuals/Makefile.am
@@ -11,39 +11,19 @@ DEFS= \
paludis_repositories_libdir = $(libdir)/paludis/repositories
-if MONOLITHIC
+noinst_LTLIBRARIES = libpaludisvirtualsrepository.la
-noinst_LTLIBRARIES = libpaludisvirtualsrepository_@PALUDIS_PC_SLOT@.la
-
-else
-
-paludis_repositories_lib_LTLIBRARIES = libpaludisvirtualsrepository_@PALUDIS_PC_SLOT@.la
-
-endif
-
-paludis_repositories_virtuals_includedir = $(includedir)/paludis-$(PALUDIS_PC_SLOT)/paludis/repositories/virtuals/
-libpaludisvirtualsrepository_@PALUDIS_PC_SLOT@_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-
-paludis_repositories_virtuals_include_HEADERS = \
+noinst_HEADERS = \
virtuals_repository.hh \
installed_virtuals_repository.hh \
package_id.hh
-libpaludisvirtualsrepository_@PALUDIS_PC_SLOT@_la_SOURCES = \
+libpaludisvirtualsrepository_la_SOURCES = \
virtuals_repository.cc \
installed_virtuals_repository.cc \
package_id.cc \
registration.cc \
- $(paludis_repositories_portage_include_HEADERS)
-
-if ! MONOLITHIC
-
-libpaludisvirtualsrepository_@PALUDIS_PC_SLOT@_la_LIBADD = \
- $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(DYNAMIC_LD_LIBS)
-
-endif
+ $(noinst_HEADERS)
TESTS = virtuals_repository_TEST installed_virtuals_repository_TEST
@@ -69,9 +49,6 @@ TESTS_ENVIRONMENT = env \
bash $(top_srcdir)/test/run_test.sh
virtuals_repository_TEST_LDADD = \
- libpaludisvirtualsrepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
@@ -80,9 +57,6 @@ virtuals_repository_TEST_LDADD = \
virtuals_repository_TEST_CXXFLAGS = $(AM_CXXFLAGS) @PALUDIS_CXXFLAGS_NO_DEBUGGING@
installed_virtuals_repository_TEST_LDADD = \
- libpaludisvirtualsrepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
diff --git a/paludis/repositories/virtuals/registration.cc b/paludis/repositories/virtuals/registration.cc
index 1a67165..8f5effa 100644
--- a/paludis/repositories/virtuals/registration.cc
+++ b/paludis/repositories/virtuals/registration.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -22,6 +22,7 @@
#include <paludis/repositories/virtuals/virtuals_repository.hh>
#include <paludis/util/set.hh>
#include <paludis/util/destringify.hh>
+#include "config.h"
using namespace paludis;
@@ -36,31 +37,38 @@ namespace
}
}
-extern "C" void paludis_initialise_repository_so(RepositoryFactory * const factory) PALUDIS_VISIBLE;
-
-void paludis_initialise_repository_so(RepositoryFactory * const factory)
+namespace paludis
{
- std::tr1::shared_ptr<Set<std::string> > virtuals_formats(new Set<std::string>);
- virtuals_formats->insert("virtuals");
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
- factory->add_repository_format(
- virtuals_formats,
- &VirtualsRepository::repository_factory_name,
- &virtual_importance,
- &VirtualsRepository::repository_factory_create,
- &VirtualsRepository::repository_factory_dependencies
- );
+ template <>
+ void register_repositories<repository_groups::virtuals>(RepositoryFactory * const factory)
+ {
+ std::tr1::shared_ptr<Set<std::string> > virtuals_formats(new Set<std::string>);
+ virtuals_formats->insert("virtuals");
+
+ factory->add_repository_format(
+ virtuals_formats,
+ &VirtualsRepository::repository_factory_name,
+ &virtual_importance,
+ &VirtualsRepository::repository_factory_create,
+ &VirtualsRepository::repository_factory_dependencies
+ );
- std::tr1::shared_ptr<Set<std::string> > installed_virtuals_formats(new Set<std::string>);
- installed_virtuals_formats->insert("installed_virtuals");
- installed_virtuals_formats->insert("installed-virtuals");
+ std::tr1::shared_ptr<Set<std::string> > installed_virtuals_formats(new Set<std::string>);
+ installed_virtuals_formats->insert("installed_virtuals");
+ installed_virtuals_formats->insert("installed-virtuals");
- factory->add_repository_format(
- installed_virtuals_formats,
- &InstalledVirtualsRepository::repository_factory_name,
- &virtual_importance,
- &InstalledVirtualsRepository::repository_factory_create,
- &InstalledVirtualsRepository::repository_factory_dependencies
- );
+ factory->add_repository_format(
+ installed_virtuals_formats,
+ &InstalledVirtualsRepository::repository_factory_name,
+ &virtual_importance,
+ &InstalledVirtualsRepository::repository_factory_create,
+ &InstalledVirtualsRepository::repository_factory_dependencies
+ );
+ }
}
diff --git a/paludis/repository_factory-fwd.hh b/paludis/repository_factory-fwd.hh
index 471679c..22abb18 100644
--- a/paludis/repository_factory-fwd.hh
+++ b/paludis/repository_factory-fwd.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
diff --git a/paludis/repository_factory.cc b/paludis/repository_factory.cc
index 497fe19..acc23c3 100644
--- a/paludis/repository_factory.cc
+++ b/paludis/repository_factory.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2008 Ciaran McCreesh
+ * Copyright (c) 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -34,8 +34,7 @@
#include <paludis/about.hh>
#include <tr1/unordered_map>
#include <list>
-#include <dlfcn.h>
-#include <stdint.h>
+#include "config.h"
using namespace paludis;
@@ -82,59 +81,40 @@ namespace paludis
struct Implementation<RepositoryFactory>
{
Keys keys;
- std::list<void *> dl_opened;
};
+
+ namespace repository_groups
+ {
+ REPOSITORY_GROUPS_DECLS;
+ }
+
+ template <>
+ void register_repositories<NoType<0u> >(RepositoryFactory * const)
+ {
+ }
}
RepositoryFactory::RepositoryFactory() :
PrivateImplementationPattern<RepositoryFactory>(new Implementation<RepositoryFactory>)
{
- FSEntry so_dir(getenv_with_default("PALUDIS_REPOSITORY_SO_DIR", LIBDIR "/paludis/repositories"));
- if (! so_dir.is_directory())
- throw InternalError(PALUDIS_HERE, "PALUDIS_REPOSITORY_SO_DIR '" + stringify(so_dir) + "' not a directory");
- _load_dir(so_dir);
+ using namespace repository_groups;
+
+ register_repositories<REPOSITORY_GROUP_IF_accounts>(this);
+ register_repositories<REPOSITORY_GROUP_IF_cran>(this);
+ register_repositories<REPOSITORY_GROUP_IF_dummy>(this);
+ register_repositories<REPOSITORY_GROUP_IF_e>(this);
+ register_repositories<REPOSITORY_GROUP_IF_gems>(this);
+ register_repositories<REPOSITORY_GROUP_IF_fake>(this);
+ register_repositories<REPOSITORY_GROUP_IF_unavailable>(this);
+ register_repositories<REPOSITORY_GROUP_IF_unwritten>(this);
+ register_repositories<REPOSITORY_GROUP_IF_unpackaged>(this);
+ register_repositories<REPOSITORY_GROUP_IF_virtuals>(this);
}
RepositoryFactory::~RepositoryFactory()
{
}
-void
-RepositoryFactory::_load_dir(const FSEntry & so_dir)
-{
- for (DirIterator d(so_dir), d_end ; d != d_end ; ++d)
- {
- if (d->is_directory())
- _load_dir(*d);
-
- if (! is_file_with_extension(*d, "_" + stringify(PALUDIS_PC_SLOT) + ".so." + stringify(100 * PALUDIS_VERSION_MAJOR + PALUDIS_VERSION_MINOR),
- IsFileWithOptions()))
- continue;
-
- /* don't use RTLD_LOCAL, g++ is over happy about template instantiations, and it
- * can lead to multiple singleton instances. */
- void * dl(dlopen(stringify(*d).c_str(), RTLD_GLOBAL | RTLD_NOW));
-
- if (dl)
- {
- _imp->dl_opened.push_back(dl);
-
- void * reg(dlsym(dl, "paludis_initialise_repository_so"));
- if (reg)
- {
- reinterpret_cast<void (*)(RepositoryFactory * const)>(reinterpret_cast<uintptr_t>(reg))(this);
- }
- else
- throw InternalError(PALUDIS_HERE, "No paludis_initialise_repository_so function defined in '" + stringify(*d) + "'");
- }
- else
- throw InternalError(PALUDIS_HERE, "Couldn't dlopen '" + stringify(*d) + "': " + stringify(dlerror()));
- }
-
- if ((so_dir / ".libs").is_directory())
- _load_dir(so_dir / ".libs");
-}
-
const std::tr1::shared_ptr<Repository>
RepositoryFactory::create(
Environment * const env,
diff --git a/paludis/repository_factory.hh b/paludis/repository_factory.hh
index d010bf1..135aec9 100644
--- a/paludis/repository_factory.hh
+++ b/paludis/repository_factory.hh
@@ -26,6 +26,7 @@
#include <paludis/util/instantiation_policy.hh>
#include <paludis/util/wrapped_forward_iterator-fwd.hh>
#include <paludis/util/fs_entry-fwd.hh>
+#include <paludis/util/no_type.hh>
#include <paludis/environment-fwd.hh>
#include <paludis/repository-fwd.hh>
#include <paludis/name-fwd.hh>
@@ -44,8 +45,6 @@ namespace paludis
RepositoryFactory();
~RepositoryFactory();
- void _load_dir(const FSEntry &);
-
public:
typedef std::tr1::function<std::string (const std::string &)> KeyFunction;
@@ -154,6 +153,9 @@ namespace paludis
ConstIterator end_keys() const PALUDIS_ATTRIBUTE((warn_unused_result));
};
+ template <typename RepositoryClass_ = NoType<0u> >
+ void register_repositories(RepositoryFactory * const);
+
#ifdef PALUDIS_HAVE_EXTERN_TEMPLATE
extern template class PrivateImplementationPattern<RepositoryFactory>;
extern template class InstantiationPolicy<RepositoryFactory, instantiation_method::SingletonTag>;
diff --git a/paludis/resolver/Makefile.am b/paludis/resolver/Makefile.am
index 61625dc..e9d293b 100644
--- a/paludis/resolver/Makefile.am
+++ b/paludis/resolver/Makefile.am
@@ -103,8 +103,6 @@ resolver_TEST_blockers_LDADD = \
libpaludisresolvertest.a \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
libpaludisresolver.a \
@@ -118,8 +116,6 @@ resolver_TEST_virtuals_LDADD = \
libpaludisresolvertest.a \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
libpaludisresolver.a \
@@ -133,8 +129,6 @@ resolver_TEST_suggestions_LDADD = \
libpaludisresolvertest.a \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
libpaludisresolver.a \
@@ -148,8 +142,6 @@ resolver_TEST_serialisation_LDADD = \
libpaludisresolvertest.a \
$(top_builddir)/paludis/util/test_extras.o \
$(top_builddir)/test/libtest.a \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
libpaludisresolver.a \
diff --git a/python/Makefile.am b/python/Makefile.am
index 4e554e7..4c774e6 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -184,12 +184,7 @@ endif
libpaludispython_@PALUDIS_PC_SLOT@_la_LIBADD = \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/paludis/libpaludispaludisenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la
+ $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la
libadditionaltests_@PALUDIS_PC_SLOT@_la_SOURCES = additional_tests.hh additional_tests.cc
libadditionaltests_@PALUDIS_PC_SLOT@_la_LIBADD = $(libpaludispython_@PALUDIS_PC_SLOT@_la_LIBADD)
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index 039a73a..bf326ec 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -154,10 +154,6 @@ endif
libpaludisruby_@PALUDIS_PC_SLOT@_la_LIBADD = \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/paludis/libpaludispaludisenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(PTHREAD_LIBS)
check_DATA = .libs/Paludis.so
diff --git a/src/clients/accerso/Makefile.am b/src/clients/accerso/Makefile.am
index 3444845..449997c 100644
--- a/src/clients/accerso/Makefile.am
+++ b/src/clients/accerso/Makefile.am
@@ -36,7 +36,6 @@ accerso_LDADD = \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/src/output/liboutput.a \
$(DYNAMIC_LD_LIBS)
diff --git a/src/clients/adjutrix/Makefile.am b/src/clients/adjutrix/Makefile.am
index 0101891..c2696ee 100644
--- a/src/clients/adjutrix/Makefile.am
+++ b/src/clients/adjutrix/Makefile.am
@@ -42,8 +42,6 @@ adjutrix_SOURCES = \
adjutrix.cc
adjutrix_LDADD = \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
diff --git a/src/clients/appareo/Makefile.am b/src/clients/appareo/Makefile.am
index b11b8aa..c1a33d7 100644
--- a/src/clients/appareo/Makefile.am
+++ b/src/clients/appareo/Makefile.am
@@ -36,7 +36,6 @@ appareo_LDADD = \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/src/output/liboutput.a \
$(DYNAMIC_LD_LIBS)
diff --git a/src/clients/instruo/Makefile.am b/src/clients/instruo/Makefile.am
index ce16d19..decdd6a 100644
--- a/src/clients/instruo/Makefile.am
+++ b/src/clients/instruo/Makefile.am
@@ -36,7 +36,6 @@ instruo_LDADD = \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/src/output/liboutput.a \
$(DYNAMIC_LD_LIBS)
diff --git a/src/clients/qualudis/Makefile.am b/src/clients/qualudis/Makefile.am
index 19e77d1..4342b42 100644
--- a/src/clients/qualudis/Makefile.am
+++ b/src/clients/qualudis/Makefile.am
@@ -18,7 +18,6 @@ qualudis_SOURCES = \
qualudis.cc
qualudis_LDADD = \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/args/libpaludisargs_@PALUDIS_PC_SLOT@.la \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \