Skip to content

Commit

Permalink
Add license notices and file
Browse files Browse the repository at this point in the history
  • Loading branch information
culler committed Jan 24, 2024
1 parent 5247085 commit 9afaa59
Show file tree
Hide file tree
Showing 11 changed files with 168 additions and 52 deletions.
37 changes: 18 additions & 19 deletions ci/linux/build_linux_tkgl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,36 +18,35 @@ wget --no-check-certificate -O tk9.tar.gz $TK9_URL
echo extracting source ...
tar xf tcl9.tar.gz --directory=tcl9 --strip-components=1
tar xf tk9.tar.gz --directory=tk9 --strip-components=1
cd tcl9/unix
echo building tcl9 ...
./configure
make -j4
cd ../../tk9/unix
echo building tk9 ...
./configure --with-tcl=../../tcl9/unix
make -j4
cd ../..
#cd tcl9/unix
#echo building tcl9 ...
#./configure
#make -j4
#cd ../../tk9/unix
#echo building tk9 ...
#./configure --with-tcl=../../tcl9/unix
#make -j4
#cd ../..
cp ci/linux/linux_configure configure
./configure --with-tcl=tcl9/unix --with-tk=tk9/unix
make
mv libtcl9Tkgl1.0.so dist/Tkgl1.0
rm -rf build

echo downloading tcl/tk source ...
wget --no-check-certificate -O tcl8.tar.gz $TCL8_URL
wget --no-check-certificate -O tk8.tar.gz $TK8_URL
echo extracting source ...
tar xf tcl8.tar.gz --directory=tcl8 --strip-components=1
tar xf tk8.tar.gz --directory=tk8 --strip-components=1
cd tcl8/unix
echo building tcl8 ...
./configure
make -j4
cd ../../tk8/unix
echo building tk8 ...
./configure --with-tcl=../../tcl8/unix
make -j4
cd ../..
#cd tcl8/unix
#echo building tcl8 ...
#./configure
#make -j4
#cd ../../tk8/unix
#echo building tk8 ...
#./configure --with-tcl=../../tcl8/unix
#make -j4
#cd ../..
./configure --with-tcl=tcl8/unix --with-tk=tk8/unix
make
mv libTkgl1.0.so dist/Tkgl.0
Expand Down
61 changes: 30 additions & 31 deletions ci/macOS/build_mac_tkgl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,38 @@ mkdir -p dist/Tkgl1.0
rm -rf tcl9 tk9 tcl8 tk8
mkdir tcl9 tk9 tcl8 tk8

echo downloading tcl/tk source ...
wget --no-check-certificate -O tcl9.tar.gz $TCL9_URL
wget --no-check-certificate -O tk9.tar.gz $TK9_URL
echo extracting source ...
tar xf tcl9.tar.gz --directory=tcl9 --strip-components=1
tar xf tk9.tar.gz --directory=tk9 --strip-components=1
cd tcl9
echo building tcl9 ...
make -j4 CFLAGS="-arch x86_64 -arch arm64 -mmacosx-version-min=10.9" -C macosx
cd ../tk9
echo building tk9 ...
make -j4 CFLAGS="-arch x86_64 -arch arm64 -mmacosx-version-min=10.9" -C macosx
cd ..
if ! [ -e tcl9.tar.gz ] || ! [ -e tcl9 ] ; then
wget --no-check-certificate -O tcl9.tgz $TCL9_URL
tar xf tcl9.tgz --directory=tcl9 --strip-components=1
fi
if ! [ -e tk9.tar.gx $Tk9_URL ] || ! [ -e tk9 ] ; then
wget --no-check-certificate -O tk9.tar.gz $TK9_URL
tar xf tk9.tar.gz --directory=tk9 --strip-components=1
fi
cd tcl9/macosx
./configure
cd ../../tk9/macosx
./configure
cd ../..

if ! [ -e tcl8.tar.gz ] || ! [ -e tcl8 ] ; then
wget --no-check-certificate -O tcl8.tgz $TCL9_URL
tar xf tcl8.tgz --directory=tcl8 --strip-components=1
fi
if ! [ -e tk8.tar.gx $Tk8_URL ] || ! [ -e tk8 ] ; then
wget --no-check-certificate -O tk8.tgz $TK9_URL
tar xf tk8.tgz --directory=tk8 --strip-components=1
fi
cd tcl8/macosx
./configure
cd ../../tk8/macosx
./configure
cd ../..
cp ci/macOS/mac_configure configure
./configure --with-tcl=build/tcl/Tcl.framework --with-tk=build/tk/Tk.framework
./configure --with-tcl=tcl8/macosx --with-tk8/macosx
make
mv libtcl9Tkgl1.0.dylib Tkgl1.0
rm -rf build

echo downloading tcl/tk source ...
wget --no-check-certificate -O tcl8.tar.gz $TCL8_URL
wget --no-check-certificate -O tk8.tar.gz $TK8_URL
echo extracting source ...
tar xf tcl8.tar.gz --directory=tcl8 --strip-components=1
tar xf tk8.tar.gz --directory=tk8 --strip-components=1
cd tcl8
echo building tcl8 ...
make -j4 CFLAGS="-arch x86_64 -arch arm64 -mmacosx-version-min=10.9" -C macosx
cd ../tk8
echo building tk8 ...
make -j4 CFLAGS="-arch x86_64 -arch arm64 -mmacosx-version-min=10.9" -C macosx
cd ..
./configure --with-tcl=build/tcl/Tcl.framework --with-tk=build/tk/Tk.framework
./configure --with-tcl=tcl9/macosx --with-tk=tk9/macosx
make
mv libTkgl1.0.dylib dist/Tkgl1.0
mv libtcl9Tkgl1.0.dylib Tkgl1.0
mv pkgIndex.tcl dist/Tkgl1.0
8 changes: 6 additions & 2 deletions generic/tkgl.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/*
* tkgl.c --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WlARRANTIES.
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which should be included with this distribution.
*/

#include "tcl.h"
#include "tk.h"
#include "tkgl.h"
Expand Down
11 changes: 11 additions & 0 deletions generic/tkgl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* tkgl.h --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which should be included with this distribution.
*/

#ifndef USE_TCL_STUBS
# define USE_TCL_STUBS
#endif
Expand Down
38 changes: 38 additions & 0 deletions license.terms
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
This software is copyrighted by Marc Culler, Nathan Dunfield, Matthias
Goerner and others. The following terms apply to all files associated
with the software unless explicitly disclaimed in individual files.

The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.

IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.

GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
in the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7013 (b) (3) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.
11 changes: 11 additions & 0 deletions macosx/tkglNSOpenGL.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* tkglNSOpenGL.c --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which should be included with this distribution.
*/

#include "tkgl.h"
#include <OpenGL/glext.h>
#include <OpenGL/gl.h>
Expand Down
11 changes: 11 additions & 0 deletions macosx/tkglPlatform.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* tkglPlatform.h (for macOS) --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which should be included with this distribution.
*/

#define TKGL_NSOPENGL 1

#include <Foundation/Foundation.h>
Expand Down
11 changes: 11 additions & 0 deletions unix/tkglGLX.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* tkglGLX.c --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which should be included with this distribution.
*/

/*
This file contains implementations of the following platform specific
functions declared in tkgl.h. They comprise the platform interface.
Expand Down
11 changes: 11 additions & 0 deletions unix/tkglPlatform.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* tkglPlatform.h (for X11-based systems) --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which should be included with this distribution.
*/

#define TKGL_X11 1

/* sudo apt install libgl1-mesa-dev might produce the headers you need. */
Expand Down
10 changes: 10 additions & 0 deletions win/tkglPlatform.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/*
* tkglPlatform.h (for Microsoft Windows) --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which should be included with this distribution.
*/
#define TKGL_WGL 1

#include <windows.h>
Expand Down
11 changes: 11 additions & 0 deletions win/tkglWGL.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*
* tkglWGL.h --
*
* Copyright (C) 2024, Marc Culler, Nathan Dunfield, Matthias Goerner
*
* This file is part of the TkGL project. TkGL is derived from Togl, which
* was written by Brian Paul, Ben Bederson and Greg Couch. TkGL is licensed
* under the Tcl license. The terms of the license are described in the file
* "license.terms" which hould be included with this distribution.
*/

/*
This file implementats the following platform specific functions declared in
tkgl.h. They comprise the platform interface.
Expand Down

0 comments on commit 9afaa59

Please sign in to comment.