From d84b9fd101d2bf3a72b9dc1d603c9b3960e8cb17 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 16 Nov 2008 21:36:02 +0100 Subject: [PATCH] Added building of a separate libucw package. --- free/libs/README | 6 ++++-- free/libucw/Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ free/libucw/README | 15 +++++++++++++++ free/libucw/configure | 35 +++++++++++++++++++++++++++++++++++ free/libucw/default.cfg | 20 ++++++++++++++++++++ 5 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 free/libucw/Makefile create mode 100644 free/libucw/README create mode 100755 free/libucw/configure create mode 100644 free/libucw/default.cfg diff --git a/free/libs/README b/free/libs/README index 1f643c2b..23dae5c5 100644 --- a/free/libs/README +++ b/free/libs/README @@ -2,6 +2,8 @@ Sherlock Holmes Libraries 3.99 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 1997--2008 Martin Mares (c) 2000--2008 Robert Spalek +(c) 2006--2008 Pavel Charvat +(c) 2008 Michal Vaner This package contains all libraries from the freely distributable version of the Sherlock Holmes search engine (see http://www.ucw.cz/holmes/). @@ -12,5 +14,5 @@ See doc/install.html for build requirements and instructions. See doc/configure.html if you want to tweak build options. -After you compile the library, you can issue `make docs' to build the API -documentation. It will appear in run/doc. +When you compile the libraries, an API documentation is also built. It will +appear in run/doc/. (It is not complete yet, though.) diff --git a/free/libucw/Makefile b/free/libucw/Makefile new file mode 100644 index 00000000..627cf9c6 --- /dev/null +++ b/free/libucw/Makefile @@ -0,0 +1,40 @@ +# Makefile for the stand-alone release of libucw +# (c) 2008 Martin Mares + +# The default target +all: runtree libs api programs extras configs + +# Include configuration +s=. +-include obj/config.mk +obj/config.mk: + @echo "You need to run configure first." && false + +BUILDSYS=$(s)/build + +# We will use the libucw build system +include $(BUILDSYS)/Maketop + +# Install the build system +include $(BUILDSYS)/Makefile + +# The UCW library +include $(s)/ucw/Makefile + +# Build documentation by default? +ifdef CONFIG_DOC +all: docs +endif + +libs: $(LIBUCW) + +# And finally the default rules of the build system +include $(BUILDSYS)/Makebottom + +ifndef CONFIG_LOCAL +install: all $(INSTALL_TARGETS) +else +install: + @echo "Nothing to install, this is a local build." && false +endif +.PHONY: install diff --git a/free/libucw/README b/free/libucw/README new file mode 100644 index 00000000..c8f67f09 --- /dev/null +++ b/free/libucw/README @@ -0,0 +1,15 @@ +The UCW Library 3.99 +~~~~~~~~~~~~~~~~~~~~ +(c) 1997--2008 Martin Mares +(c) 2000--2008 Robert Spalek +(c) 2006--2008 Pavel Charvat +(c) 2008 Michal Vaner + +See doc/using-libs for description of the library. + +See doc/install.html for build requirements and instructions. + +See doc/configure.html if you want to tweak build options. + +When you compile the libraries, an API documentation is also built. It will +appear in run/doc/. (It is not complete yet, though.) diff --git a/free/libucw/configure b/free/libucw/configure new file mode 100755 index 00000000..4f3303db --- /dev/null +++ b/free/libucw/configure @@ -0,0 +1,35 @@ +#!/usr/bin/perl +# Configure Script for Stand-Alone LibUCW +# (c) 2008 Martin Mares + +use warnings; +use strict; + +our $srcdir; +BEGIN { + my $pkgfile = "ucw/wildmatch.c"; + if (!defined ($srcdir = $ENV{"SRCDIR"})) { + if (-f $pkgfile) { + $srcdir="."; + } elsif ($0 =~ m@^(.*)/configure$@ && -f "$1/$pkgfile") { + $srcdir=$1; + } else { + die "Don't know how to find myself. Please set SRCDIR manually.\n"; + } + } +} + +use lib "$srcdir/ucw/perl/"; +use UCW::Configure; + +Init($srcdir, "default.cfg"); +Include "ucw/default.cfg"; +Log "### Configuring LibUCW " . Get("SHERLOCK_VERSION") . " with configuration " . Get("CONFIG") . "\n"; +Include Get("CONFIG"); +require UCW::Configure::Paths; +require UCW::Configure::C; +require UCW::Configure::LibUCW; +require UCW::Configure::Doc; +Finish(); + +Log "\nConfigured, run `make' to build everything.\n"; diff --git a/free/libucw/default.cfg b/free/libucw/default.cfg new file mode 100644 index 00000000..2c9527e4 --- /dev/null +++ b/free/libucw/default.cfg @@ -0,0 +1,20 @@ +# Default configuration of LibUCW (see ucw/default.cfg for an explanation) + +# Do we want shared or static libraries? +Set("CONFIG_SHARED"); + +# We want the public API +Set("CONFIG_INSTALL_API"); + +# Libucw should support files >2GB and threading +Set("CONFIG_LARGE_FILES"); +Set("CONFIG_UCW_THREADS" => 1); + +# Libucw extensions +Set("CONFIG_UCW_PERL" => 1); +Set("CONFIG_UCW_PERL_MODULES" => 1); +Set("CONFIG_UCW_SHELL_UTILS" => 1); +Set("CONFIG_UCW_UTILS" => 1); + +# Return success +1; -- 2.39.5