michael@34: ## michael@34: ## mesa.spec -- OpenPKG RPM Package Specification michael@616: ## Copyright (c) 2000-2009 OpenPKG Foundation e.V. michael@34: ## michael@34: ## Permission to use, copy, modify, and distribute this software for michael@34: ## any purpose with or without fee is hereby granted, provided that michael@34: ## the above copyright notice and this permission notice appear in all michael@34: ## copies. michael@34: ## michael@34: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@34: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@34: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@34: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@34: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@34: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@34: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@34: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@34: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@34: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@34: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@34: ## SUCH DAMAGE. michael@34: ## michael@34: michael@34: # package information michael@34: Name: mesa michael@34: Summary: OpenGL Toolkit michael@34: URL: http://www.mesa3d.org/ michael@34: Vendor: Brian Paul michael@34: Packager: OpenPKG Foundation e.V. michael@34: Distribution: OpenPKG Community michael@34: Class: EVAL michael@34: Group: XWindow michael@34: License: LGPL michael@616: Version: 7.4.4 michael@616: Release: 20101008 michael@34: michael@34: # list of sources michael@34: Source0: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaLib-%{version}.tar.bz2 michael@34: Source1: http://osdn.dl.sourceforge.net/sourceforge/mesa3d/MesaGLUT-%{version}.tar.bz2 michael@34: Patch0: mesa.patch michael@34: michael@34: # build information michael@34: Prefix: %{l_prefix} michael@34: BuildRoot: %{l_buildroot} michael@616: BuildPreReq: OpenPKG, openpkg >= 20040130, X11, gcc, make, autoconf michael@616: PreReq: OpenPKG, openpkg >= 20040130, X11 michael@34: AutoReq: no michael@34: AutoReqProv: no michael@34: michael@34: %description michael@34: Mesa is a full-featured 3D graphics rendering library providing the michael@34: official OpenGL 2.0 and OpenGL 2.1 APIs. A variety of device drivers michael@34: allow Mesa to be used in many different environments ranging from michael@34: software emulation to complete hardware acceleration for modern michael@34: GPUs. michael@34: michael@34: %track michael@34: prog mesa:MesaLib = { michael@34: version = %{version} michael@616: url = http://sourceforge.net/projects/mesa3d/files/ michael@34: regex = MesaLib-(7\.\d+(?:\.\d+)?)\.tar\.bz2 michael@34: } michael@34: prog mesa:MesaGLUT = { michael@34: version = %{version} michael@616: url = http://sourceforge.net/projects/mesa3d/files/ michael@34: regex = MesaGLUT-(7\.\d+(?:\.\d+)?)\.tar\.bz2 michael@34: } michael@34: michael@34: %prep michael@34: %setup -q -n Mesa-%{version} michael@34: %setup -q -n Mesa-%{version} -T -D -b 1 michael@34: %patch -p0 michael@34: %{l_shtool} subst \ michael@34: -e "s;@l_x11bindir@;`%{l_rc} --query x11_bindir`;g" \ michael@34: configs/default michael@34: %{l_shtool} subst \ michael@616: -e 's;\(PIC_FLAGS =\).*;\1 -fPIC;' \ michael@616: configs/linux-* michael@34: michael@34: %build michael@34: case "%{l_platform -t}" in michael@34: *-freebsd* ) plat="freebsd" ;; michael@34: *-netbsd* ) plat="netbsd" ;; michael@34: i?86*-linux* ) plat="linux-x86-static" ;; michael@34: *-linux* ) plat="linux-static" ;; michael@34: i?86*-sunos* ) plat="solaris-x86-gcc" ;; michael@34: *-sunos* ) plat="sunos5-gcc" ;; michael@34: * ) echo "platform %{l_platform -t} not supported" 2>&1; exit 1; ;; michael@34: esac michael@616: CC="%{l_cc}" \ michael@616: CXX="%{l_cxx}" \ michael@616: CFLAGS="%{l_cflags -O}" \ michael@616: CXXFLAGS="%{l_cxxflags -O}" \ michael@616: CPPFLAGS="%{l_cppflags}" \ michael@616: LDFLAGS="%{l_ldflags}" \ michael@616: X11LIB_DIR="`%{l_rc} --query x11_libdir`" \ michael@616: %{l_make} %{l_mflags} \ michael@616: SHELL="%{l_bash}" \ michael@616: $plat michael@34: michael@34: %install michael@34: rm -rf $RPM_BUILD_ROOT michael@34: %{l_shtool} mkdir -f -p -m 755 \ michael@34: $RPM_BUILD_ROOT%{l_prefix}/lib \ michael@34: $RPM_BUILD_ROOT%{l_prefix}/include/GL michael@34: %{l_shtool} install -c -m 644 \ michael@34: lib/* $RPM_BUILD_ROOT%{l_prefix}/lib/ michael@34: %{l_shtool} install -c -m 644 \ michael@34: include/GL/*.h $RPM_BUILD_ROOT%{l_prefix}/include/GL/ michael@34: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@34: michael@34: %files -f files michael@34: michael@34: %clean michael@34: rm -rf $RPM_BUILD_ROOT michael@34: