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

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

[Mingw-cross-env-list] libopencsg.mk proposal


From: Brad Pitcher
Subject: [Mingw-cross-env-list] libopencsg.mk proposal
Date: Mon, 26 Sep 2011 09:51:33 -0700

I have built openscad successfully, which relies heavily on opencsg, so I think this is ready for inclusion. I will be proposing several other packages as well.

http://www.opencsg.org/

I've attached the file as well as copy/pasted it here (which messes up the spacing)

==============================

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

# libopencsg
PKG             := libopencsg
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 1.3.1
$(PKG)_CHECKSUM := d94c22d4e824c6b5e69a97a726b514ecaf9e4596
$(PKG)_SUBDIR   := OpenCSG-$($(PKG)_VERSION)
$(PKG)_FILE     := OpenCSG-$($(PKG)_VERSION).tar.gz
$(PKG)_WEBSITE  := http://www.opencsg.org/
$(PKG)_URL      := http://www.opencsg.org/$($(PKG)_FILE)
$(PKG)_DEPS     := gcc freeglut glew qt

define $(PKG)_UPDATE
    wget -q -O- 'http://www.opencsg.org/#download' | \
    grep 'OpenCSG-' | \
    $(SED) -n 's,.*OpenCSG-\([0-9][^>]*\)\.tar.*,\1,p' | \
    head -1
endef

define $(PKG)_BUILD
    cd '$(1)/src' && $(SED) -i 's/release/release staticlib\nDEFINES += FREEGLUT_STATIC GLEW_STATIC/g' src.pro
    cd '$(1)/example' && $(SED) -i 's,\(lGLEW\),\1 -lglut -lglu32 -lopengl32 -lwinmm -lgdi32\nDEFINES += FREEGLUT_STATIC GLEW_STATIC,g' example.pro
    cd '$(1)/example' && $(SED) -i 's,opencsgexample,test-libopencsg\nRelease:DESTDIR = $(PREFIX)/$(TARGET)/bin/,g' example.pro
    cd '$(1)/src' && '$(TARGET)-qmake' src.pro && $(MAKE) -C '$(1)/src' -j '$(JOBS)'
    cd '$(1)/example' && '$(TARGET)-qmake' example.pro && $(MAKE) -C '$(1)/example' -j '$(JOBS)'
    $(INSTALL) -m644 '$(1)/lib/libopencsg.a' '$(PREFIX)/$(TARGET)/lib/'
    $(INSTALL) -m644 '$(1)/include/opencsg.h' '$(PREFIX)/$(TARGET)/include/'
endef

Attachment: libopencsg.mk
Description: Binary data


reply via email to

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