mongoose: update to 3.7.

This commit is contained in:
Juan RP 2013-04-23 10:10:48 +02:00
parent 56c4b9941d
commit 8cb556aec2
2 changed files with 29 additions and 34 deletions

View File

@ -1,35 +1,30 @@
--- Makefile.orig 2012-06-19 09:55:56.512085441 +0200 --- Makefile.orig 2013-04-23 09:56:44.031317155 +0200
+++ Makefile 2012-06-19 10:02:28.949545937 +0200 +++ Makefile 2013-04-23 10:01:52.126993442 +0200
@@ -22,19 +22,20 @@ all: @@ -17,7 +17,9 @@
### UNIX build: linux, bsd, mac, rtems # -DUSE_LUA - embed Lua in Mongoose (+100kb)
##########################################################################
-CFLAGS = -W -Wall -std=c99 -pedantic -O2 $(COPT) PROG = mongoose
+CFLAGS += -W -Wall -std=c99 -pedantic -O2 $(COPT) -CFLAGS = -std=c99 -O2 -W -Wall -pedantic -pthread $(COPT)
MAC_SHARED = -flat_namespace -bundle -undefined suppress +LIB = lib$(PROG).so.0
-LINFLAGS = -ldl -pthread $(CFLAGS) +CFLAGS += -std=c99 -O2 -W -Wall -pedantic -pthread $(COPT)
-LIB = _$(PROG).so +
-CC = g++
+LINFLAGS += -ldl -pthread
+LIB ?= lib$(PROG).so.0
+CC ?= gcc
# Make sure that the compiler flags come last in the compilation string. # To build with Lua, download and unzip Lua 5.2.1 source code into the
# If not so, this can break some on some Linux distros which use # mongoose directory, and then add $(LUA_SOURCES) to CFLAGS
@@ -79,7 +81,9 @@ all:
# "-Wl,--as-needed" turned on by default in cc command. # "-Wl,--as-needed" turned on by default in cc command.
# Also, this is turned in many other distros in static linkage builds. # Also, this is turned in many other distros in static linkage builds.
linux: linux:
- $(CC) mongoose.c -shared -fPIC -fpic -o $(LIB) $(LINFLAGS) - $(CC) mongoose.c main.c -o $(PROG) -ldl $(CFLAGS)
- $(CC) mongoose.c main.c -o $(PROG) $(LINFLAGS)
+ $(CC) mongoose.c -shared -fPIC -fpic -Wl,-soname,$(LIB) \ + $(CC) mongoose.c -shared -fPIC -fpic -Wl,-soname,$(LIB) \
+ -o $(LIB) $(LINFLAGS) $(CFLAGS) + -o $(LIB) -ldl -lpthread $(CFLAGS)
+ $(CC) main.c -o $(PROG) $(LINFLAGS) -L. $(LIB) $(CFLAGS) + $(CC) main.c -o $(PROG) -ldl -lpthread -L. $(LIB) $(CFLAGS)
mac: bsd
bsd: bsd:
$(CC) mongoose.c -shared -pthread -fpic -fPIC -o $(LIB) $(CFLAGS) @@ -94,6 +98,18 @@ bsd_yassl:
@@ -50,6 +51,18 @@ solaris: solaris:
gcc mongoose.c main.c -pthread -lnsl -lsocket -o $(PROG) $(CFLAGS) $(CC) mongoose.c main.c -lnsl -lsocket -o $(PROG) $(CFLAGS)
+install: +install:
+ install -d $(DESTDIR)$(PREFIX)/include + install -d $(DESTDIR)$(PREFIX)/include
@ -41,8 +36,8 @@
+ ln -sf $(LIB) libmongoose.so; cp -a libmongoose.so $(DESTDIR)$(PREFIX)/lib + ln -sf $(LIB) libmongoose.so; cp -a libmongoose.so $(DESTDIR)$(PREFIX)/lib
+ install -m755 $(LIB) $(DESTDIR)$(PREFIX)/lib + install -m755 $(LIB) $(DESTDIR)$(PREFIX)/lib
+ install -d $(DESTDIR)$(PREFIX)/$(MANDIR)/man1 + install -d $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+ install -m644 mongoose.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1 + -install -m644 mongoose.1 $(DESTDIR)$(PREFIX)/$(MANDIR)/man1
+ +
########################################################################## # For codesign to work in non-interactive mode, unlock login keychain:
### WINDOWS build: Using Visual Studio or Mingw # security unlock ~/Library/Keychains/login.keychain
########################################################################## # See e.g. http://lists.apple.com/archives/apple-cdsa/2008/Jan/msg00027.html

View File

@ -1,7 +1,7 @@
# Template file for 'mongoose' # Template file for 'mongoose'
pkgname=mongoose pkgname=mongoose
version=3.1 version=3.7
revision=3 revision=1
wrksrc=$pkgname wrksrc=$pkgname
build_style=gnu-makefile build_style=gnu-makefile
make_build_args="linux" make_build_args="linux"
@ -11,21 +11,21 @@ maintainer="Juan RP <xtraeme@gmail.com>"
license="MIT" license="MIT"
homepage="https://code.google.com/p/mongoose/" homepage="https://code.google.com/p/mongoose/"
distfiles="https://mongoose.googlecode.com/files/mongoose-$version.tgz" distfiles="https://mongoose.googlecode.com/files/mongoose-$version.tgz"
checksum=fd003ff722d8b654a6ceaaadeffb1806d2d513afe888ba00ecfb4a115897844c checksum=8376ede0378b6dd80ded78953726e9d3c18a2a8fd1a52a03efe949fd09d2ea68
long_desc=" long_desc="
Mongoose is easy to use web server. It also can be used as embedded web server Mongoose is easy to use web server. It also can be used as embedded web server
library to provide web interface to applications." library to provide web interface to applications."
mongoose-devel_package() { mongoose-devel_package() {
depends="libmongoose>=$version" depends="libmongoose>=$version"
short_desc="${short_desc} -- development files" short_desc="An Easy to use Web server -- development files"
pkg_install() { pkg_install() {
vmove usr/include vmove usr/include
} }
} }
libmongoose_package() { libmongoose_package() {
short_desc="${short_desc} -- shared library" short_desc="An Easy to use Web server -- shared library"
pkg_install() { pkg_install() {
vmove usr/lib vmove usr/lib
} }
@ -33,6 +33,6 @@ libmongoose_package() {
mongoose_package() { mongoose_package() {
pkg_install() { pkg_install() {
vmove usr vmove all
} }
} }