aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/cran
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/cran
parent15792dbb2affa34cb6a9790a53f20ca9a024e72e (diff)
downloadpaludis-f6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5.tar.gz
paludis-f6b265538d15fe0d0b3e7906e0a2ffcd98fec4d5.tar.xz
Don't load repositories from .sos
Diffstat (limited to 'paludis/repositories/cran')
-rw-r--r--paludis/repositories/cran/Makefile.am30
-rw-r--r--paludis/repositories/cran/registration.cc54
2 files changed, 37 insertions, 47 deletions
diff --git a/paludis/repositories/cran/Makefile.am b/paludis/repositories/cran/Makefile.am
index 415192174..cfb793cf1 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,7 +60,6 @@ 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 \
@@ -88,7 +72,6 @@ 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 \
@@ -101,7 +84,6 @@ 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 \
diff --git a/paludis/repositories/cran/registration.cc b/paludis/repositories/cran/registration.cc
index 8cfe3449c..d1edb4421 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
+ );
+ }
}