--- trunk/opengl-update/opengl-update.in 2012/11/15 10:46:58 1974 +++ trunk/opengl-update/opengl-update.in 2012/11/15 11:55:31 1978 @@ -241,7 +241,7 @@ mkdir -p ${DST_PREFIX}/${LIBDIR} pushd ${DST_PREFIX}/${LIBDIR} &> /dev/null # First remove old symlinks - for file in libGL{,core}.{a,so,la} + for file in lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la} do [[ -h ${file} ]] && rm -f ${file} done @@ -249,7 +249,7 @@ # Note that we don't do .so*, just .so on purpose. The # loader knows to look in the profile dir, and the # linked just needs the .so - for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/libGL{,core}.{so,a,la} + for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la} do [[ -f ${file} ]] || continue [[ -f ${file##*/} ]] && rm -f ${file##*/} @@ -269,12 +269,12 @@ mkdir -p ${DST_PREFIX}/${LIBDIR}/tls pushd ${DST_PREFIX}/${LIBDIR}/tls &> /dev/null # First remove old symlinks - for file in libGL{,core}.{a,so,la} + for file in lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la} do [[ -h ${file} ]] && rm -f ${file} done - for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/libGL{,core}.{so,a,la} + for file in ${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib/tls/lib{EGL,GL*,OpenVG}{,core}.{so,dylib,a,la} do [[ -f ${file} ]] || continue [[ -f ${file##*/} ]] && rm -f ${file##*/} @@ -303,7 +303,7 @@ mkdir -p ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/extensions pushd ${DST_PREFIX}/${LIBDIR}/${MODULEDIR}/extensions &> /dev/null # First remove old symlinks - for file in libglx.so libglx.a + for file in lib{wfb,glx,dri,dri2}.{so,dylib,a} do [[ -h ${file} ]] && rm -f ${file} done @@ -325,42 +325,50 @@ fi # Setup the includes - mkdir -p ${DST_PREFIX}/include/GL - pushd ${DST_PREFIX}/include/GL &> /dev/null - for file in gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h - do - # IMPORTANT - # It is preferable currently to use the standard glext.h file - # however if an OpenGL provider must use a self produced glext.h - # then it should be installed to ${GL_IMPLEM}/include and the user - # can add the --impl-headers option to select it. + headers[GL]="gl.h glx.h glxtokens.h glext.h glxext.h glxmd.h glxproto.h" + headers[GLES]="egl.h gl_extensions.h glext.h gl.h glplatform.h" + headers[GLES2]="gl2ext.h gl2.h gl2platform.h" + headers[EGL]="eglext.h egl.h eglplatform.h" + headers[KHR]="khrplatform.h" + headers[VG]="openvg.h vgext.h vgplatform.h vgu.h" + for incl_dir in EGL GL GLES GLES2 KHR VG + do + mkdir -p ${DST_PREFIX}/include/${incl_dir} + pushd ${DST_PREFIX}/include/${incl_dir} &> /dev/null + for file in ${headers[${incl_dir}]} + do + # IMPORTANT + # It is preferable currently to use the standard glext.h file + # however if an OpenGL provider must use a self produced glext.h + # then it should be installed to ${GL_IMPLEM}/include and the user + # can add the --impl-headers option to select it. + if [[ ${USE_PROFILE_HEADERS} = yes ]] + then + # Check the profile first. + if [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} ]] + then + [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file} + ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} + fi + continue + fi - if [[ ${USE_PROFILE_HEADERS} = yes ]] - then - # Check the profile first. - if [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} ]] + if [[ -e ${PREFIX}/${LIBDIR}/opengl/global/include/${incl_dir}/${file} ]] then [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file} - ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} + ln -s ${PREFIX}/${LIBDIR}/opengl/global/include/${incl_dir}/${file} + elif [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} ]] + then + [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file} + ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${incl_dir}/${file} + elif [[ -e ${PREFIX}/${LIBDIR}/opengl/xorg/include/${incl_dir}/${file} ]] + then + [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file} + ln -s ${PREFIX}/${LIBDIR}/opengl/xorg/include/${incl_dir}/${file} fi - continue - fi - - if [[ -e ${PREFIX}/${LIBDIR}/opengl/global/include/${file} ]] - then - [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file} - ln -s ${PREFIX}/${LIBDIR}/opengl/global/include/${file} - elif [[ -e ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} ]] - then - [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file} - ln -s ${PREFIX}/${LIBDIR}/opengl/${GL_IMPLEM}/include/${file} - elif [[ -e ${PREFIX}/${LIBDIR}/opengl/xorg/include/${file} ]] - then - [[ -f "${file}" || ( -L "${file}" && ! -e "${file}" ) ]] && rm -f ${file} - ln -s ${PREFIX}/${LIBDIR}/opengl/xorg/include/${file} - fi - done - popd &> /dev/null + done + popd &> /dev/null + done # Setup the $LDPATH ldpath="${ldpath:+${ldpath}:}${PREFIX}/${LIBDIR}/opengl/${GL_LOCAL}/lib"