<commit_before># cmake/modules/psttf.cmake
#
# Copyright (C) 2006  <NAME>
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; version 2 of the License.
#
# PLplot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the file PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

# Configuration for the psttf device driver (supporting the psttf and 
# psttfc devices).
#
# The following variables are set / modified
#
# PLD_psttf               - ON means the psttf and psttfc devices are enabled.
# psttf_COMPILE_FLAGS  	  - COMPILE_FLAGS (string) required to compile psttf
# 		            device driver.
# psttf_LINK_FLAGS     	  - LINK_FLAGS (string) for dynamic psttf device driver.
# psttf_RPATH	       	  - RPATH directory list for psttf device driver.
# psttf_TARGETS	       	  - Full Name of libLASi so that cmake can figure out
# 		       	    RPATH stuff in the build tree.
# DRIVERS_LINK_FLAGS  	  - list of device LINK_FLAGS and TARGETS for case
# 			    when ENABLE_DYNDRIVERS OFF.

# Include file searches use FindPath. To add extra search directories
# set the environment variable CMAKE_INCLUDE_PATH.
# Library searches use FindLibrary. To add extra search directories
# set the environment variable CMAKE_LIBRARY_PATH.
# See cmake documentation for further details.

# Look for psttf headers and libraries with pkg-config
if(PLD_psttf)
  if(NOT PKGCONFIG_EXECUTABLE)
    message(STATUS 
    "WARNING: pkg-config not found. Setting PLD_psttf to OFF."
    )
    set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
  endif(NOT PKGCONFIG_EXECUTABLE)
endif(PLD_psttf)

if(PLD_psttf)
  pkgconfig("pango;pangoft2;lasi" includedir libdir linkflags cflags)
  if(linkflags AND cflags)
    set(psttf_COMPILE_FLAGS "${cflags}")
    set(psttf_LINK_FLAGS "${linkflags}")
    # Convert from blank-delimited to a cmake list
    string(REGEX REPLACE " +" ";" psttf_RPATH ${libdir})
    # Put libLASI pkg-config information into a form that
    # target_link_libraries can interpret properly with respect to RPATH
    # for the build tree.
    find_library(psttf_TARGETS LASi ${psttf_RPATH})
    if(NOT psttf_TARGETS)
      message(FATAL_ERROR
         "libLASi not in location specified by pkg-config."
      )
    endif(NOT psttf_TARGETS)
    get_filename_component(psttf_RPATH ${psttf_TARGETS} PATH)
    set(DRIVERS_LINK_FLAGS
    ${DRIVERS_LINK_FLAGS}
    ${psttf_LINK_FLAGS}
    ${psttf_TARGETS}
    )
  else(linkflags AND cflags)
    message(STATUS
       "WARNING: pango, pangoft2, or lasi not found with pkg-config.\n"
    "   Setting PLD_psttf to OFF.  Please install all of these packages\n"
    "   and/or set the environment variable PKG_CONFIG_PATH appropriately."
    )
    set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
  endif(linkflags AND cflags)
endif(PLD_psttf)
# Test for correct version of liblasi by looking
# for API that was added for 1.0.5 which is required by PLplot.???<commit_msg>Add libdir test in logical blocks since that variable is used within the blocks.<commit_after># cmake/modules/psttf.cmake
#
# Copyright (C) 2006  Alan <NAME>
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; version 2 of the License.
#
# PLplot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the file PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

# Configuration for the psttf device driver (supporting the psttf and 
# psttfc devices).
#
# The following variables are set / modified
#
# PLD_psttf               - ON means the psttf and psttfc devices are enabled.
# psttf_COMPILE_FLAGS  	  - COMPILE_FLAGS (string) required to compile psttf
# 		            device driver.
# psttf_LINK_FLAGS     	  - LINK_FLAGS (string) for dynamic psttf device driver.
# psttf_RPATH	       	  - RPATH directory list for psttf device driver.
# psttf_TARGETS	       	  - Full Name of libLASi so that cmake can figure out
# 		       	    RPATH stuff in the build tree.
# DRIVERS_LINK_FLAGS  	  - list of device LINK_FLAGS and TARGETS for case
# 			    when ENABLE_DYNDRIVERS OFF.

# Include file searches use FindPath. To add extra search directories
# set the environment variable CMAKE_INCLUDE_PATH.
# Library searches use FindLibrary. To add extra search directories
# set the environment variable CMAKE_LIBRARY_PATH.
# See cmake documentation for further details.

# Look for psttf headers and libraries with pkg-config
if(PLD_psttf)
  if(NOT PKGCONFIG_EXECUTABLE)
    message(STATUS 
    "WARNING: pkg-config not found. Setting PLD_psttf to OFF."
    )
    set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
  endif(NOT PKGCONFIG_EXECUTABLE)
endif(PLD_psttf)

if(PLD_psttf)
  pkgconfig("pango;pangoft2;lasi" includedir libdir linkflags cflags)
  if(linkflags AND cflags AND libdir)
    set(psttf_COMPILE_FLAGS "${cflags}")
    set(psttf_LINK_FLAGS "${linkflags}")
    # Convert from blank-delimited to a cmake list
    string(REGEX REPLACE " +" ";" psttf_RPATH ${libdir})
    # Put libLASI pkg-config information into a form that
    # target_link_libraries can interpret properly with respect to RPATH
    # for the build tree.
    find_library(psttf_TARGETS LASi ${psttf_RPATH})
    if(NOT psttf_TARGETS)
      message(FATAL_ERROR
         "libLASi not in location specified by pkg-config."
      )
    endif(NOT psttf_TARGETS)
    get_filename_component(psttf_RPATH ${psttf_TARGETS} PATH)
    set(DRIVERS_LINK_FLAGS
    ${DRIVERS_LINK_FLAGS}
    ${psttf_LINK_FLAGS}
    ${psttf_TARGETS}
    )
  else(linkflags AND cflags AND libdir)
    #message("includedir = ${includedir}")
    #message("libdir = ${libdir}")
    #message("linkflags = ${linkflags}")
    #message("cflags = ${cflags}")
    message(STATUS
       "WARNING: pango, pangoft2, or lasi not found with pkg-config.\n"
    "   Setting PLD_psttf to OFF.  Please install all of these packages\n"
    "   and/or set the environment variable PKG_CONFIG_PATH appropriately."
    )
    set(PLD_psttf OFF CACHE BOOL "Enable psttf device" FORCE)
  endif(linkflags AND cflags AND libdir)
endif(PLD_psttf)
# Test for correct version of liblasi by looking
# for API that was added for 1.0.5 which is required by PLplot.???
{'fraction_non_alphanumeric': 0.0673604275066798, 'fraction_numerical': 0.005906342286598228, 'mean_word_length': 3.654450261780105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '781293', 'n_tokens_mistral': 2331, 'n_tokens_neox': 2246, 'n_words': 817}