aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/virtuals
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-12 18:33:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-12 18:33:48 +0100
commitf6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5 (patch)
tree1b61a86ee5b9eaf13b2fbf2fda1b3c2febc1c471 /paludis/repositories/virtuals
parent15792dbb2affa34cb6a9790a53f20ca9a024e72e (diff)
downloadpaludis-f6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5.tar.gz
paludis-f6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5.tar.xz
Don't load repositories from .sos
Diffstat (limited to 'paludis/repositories/virtuals')
-rw-r--r--paludis/repositories/virtuals/Makefile.am32
-rw-r--r--paludis/repositories/virtuals/registration.cc54
2 files changed, 35 insertions, 51 deletions
diff --git a/paludis/repositories/virtuals/Makefile.am b/paludis/repositories/virtuals/Makefile.am
index de8851a5f..bbdbfd43d 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,8 +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 \
@@ -80,8 +58,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 \
diff --git a/paludis/repositories/virtuals/registration.cc b/paludis/repositories/virtuals/registration.cc
index 1a6716506..8f5effa7c 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
+ );
+ }
}