mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] Help with liboauth.mk


From: Gareth Coco
Subject: [Mingw-cross-env-list] Help with liboauth.mk
Date: Thu, 16 Dec 2010 09:32:30 -0500

HI,

I've been using liboauth (http://liboauth.sourceforge.net/) in a
project and things have been successful so I thought I'd work on
making it available for the project.

At the bottom is a working liboauth.mk but there are some issues that
I do not really know how to fix.

Issue 1 - Check program: liboauth has some built in check programs.
The mk at the moment just runs "make check" which compiles the checks
and then runs them. If you don't have wine installed they fail. If
wine is installed then the checks seem to pass. I need some help on
just building in the checks to compile them up and then you run them
manually.

Issue 2 - oauth.pc: This file when you build the program only shows
the libs - libcurl and libcrypto - as being required. In reality you
need many other libs to make this run. Should the oauth.pc have all
the libs that are needed to compile programs? I did make two change to
configure.ac which did change the way oauth.pc was created. Do we also
need the cflags included in the oauth.pc?

From:

dnl ** check for libcurl
AS_IF([test "${enable_libcurl}" != "no"], [
  PKG_CHECK_MODULES(CURL, libcurl, [ AC_DEFINE(HAVE_CURL, 1)
HAVE_CURL=1 PC_REQ="$PC_REQ libcurl" PC_LIB="$PC_LIB -lcurl"
report_curl="libcurl" ])
])

to (-lcurl replaced with $CURL_LIBS)

dnl ** check for libcurl
AS_IF([test "${enable_libcurl}" != "no"], [
  PKG_CHECK_MODULES(CURL, libcurl, [ AC_DEFINE(HAVE_CURL, 1)
HAVE_CURL=1 PC_REQ="$PC_REQ libcurl" PC_LIB="$PC_LIB $CURL_LIBS"
report_curl="libcurl" ])
])

and from:

  report_hash="OpenSSL"
  PC_LIB="$PC_LIB -lcrypto"
  PC_REQ="$PC_REQ libcrypto"

to (-lcrypto replaced with $HASHLIBS)

  report_hash="OpenSSL"
  PC_LIB="$PC_LIB $HASH_LIBS"
  PC_REQ="$PC_REQ libcrypto"

This is more an upstream thing to fix but I don't know if this the
best way to do things so suggestions welcome. If this is the right way
then I need some help writing a patch and then I can send this to the
upstream to hopefully fix in the future. Ideally the upstream would
also use pkg-config to get the openssl libs but that may be a dream of
mine.

Regards

Gareth

------- liboauth.mk -------

# This file is part of mingw-cross-env.
# See doc/index.html for further information.

# liboauth
PKG             := liboauth
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 0.9.1
$(PKG)_CHECKSUM := f554a8f5e4edbabd64df7638cf4a2f9060ac5671
$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_WEBSITE  := http://liboauth.sourceforge.net/
$(PKG)_URL      := http://liboauth.sourceforge.net/pool/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc curl openssl

define $(PKG)_UPDATE
    wget -q -O- 'http://liboauth.sourceforge.net/' | \
    $(SED) -n 's,.*liboauth-\([0-9][^>]*\)\.tar.*,\1,p' | \
    head -1
endef

define $(PKG)_BUILD
    cd '$(1)' && ./configure \
        --host='$(TARGET)' \
        --prefix='$(PREFIX)/$(TARGET)' \
        --disable-shared \
        --disable-curl \
        HASH_LIBS="`$(TARGET)-pkg-config --libs libcrypto`" \
        HASH_CFLAGS="`$(TARGET)-pkg-config --cflags libcrypto`"
    $(MAKE) -C '$(1)' -j '$(JOBS)'
    $(MAKE) -C '$(1)' -j '$(JOBS)' check
    $(MAKE) -C '$(1)' -j '$(JOBS)' install
endef



reply via email to

[Prev in Thread] Current Thread [Next in Thread]